Camera Anchor and Damage Indicators in Top Down view

NickLB

New member
Hi there!

So, couple of questions:

1. We're trying to create "look ahead" camera behaviour while aiming in Top Down view. What is the easiest approach?
My thought was to create an additional anchor which should follow the character and it should be assigned to the CameraController's anchor after the character is instantiated, and then this additional anchor's script will require adjusting offset while aiming.

2. Also in the Top Down view mode indicators don't point correctly to the source of damage. Is there any quick solution for this?

Thank you!
 
1. That's exactly what I would have suggested! An alternative might be to change the camera's anchor transform during runtime to whatever object/transform you want it to focus on.

2. I haven't seen this before - could you provide a gif/screenshot of the issue? Does the indicator seem to be offset by a consistent amount or is it pointing at something completely wrong? The DamageIndicatorMonitor component is responsible for all this, so maybe take a look at its OnDamage method.
 
Thank you for a quick response!

1. Great.
2. You can check the demo build from opsive.com website. You'll notice that indicators point only to the left/right-ish in top-down view. I did check DamageIndicatorMonitor component, angle calculation in both OnDamage and Update methods seems to be alright, I suppose it's the transforms that are used in this view are not correct.
An example from WebGL build: http://i.imgur.com/WhwpAd1.gifv
 
Last edited:
The issue is line 239 in DamageIndicatorMonitor:

var angle = Vector3.Angle(direction, m_CameraTransform.forward) * Mathf.Sign(Vector3.Dot(direction, m_CameraTransform.right));

Changing m_CameraTransform.forward to m_CameraTransform.up solves the issue for the top-down view. I'll pass this on to Justin to hopefully be put in to the next update, but for now you can just change that line manually and it should solve the issue.
 
Top