Lock-On System

wlabsocks

New member
Hey,

I'm building a Lock-On system for a Opsive Third Person Controller.

I want the character to move towards the direction the camera is facing.

sample:
Even though my character is looking in front, when i press "w" the character has to play walk back animation because the camera is looking back.

Since the character direction will be locked to the enemy, the movement system needs to reference the camera direction.
 
Last edited:
Which view type are you using? The third person RPG/Adventure view types may do what you want. You can test these in the demo scene - they both move the character in the forward direction of the camera.
 
Which view type are you using? The third person RPG/Adventure view types may do what you want. You can test these in the demo scene - they both move the character in the forward direction of the camera.
i use combat movement type.
what I want; Playing the "walkbackward" animation while the camera is looking back, without the character turning back.
Likewise, if the camera is looking to the right, the "walkstrafeleft" animation should play when I press "w".
 
Last edited:
In the current state, my character's direction is always target-oriented, locked. and in this case, no matter which camera direction look at, when I press "w" the character walks in the direction nolan's looking at.
What I want is for the character to walk in the direction the camera is looking, even if it is facing the target. Without changing the character direction.
 
Ah I see what you mean. I think you'd need to create a custom movement type for this. Basically you'd want to adjust the input vector returned by GetInputVector so that it's always independent of the camera's rotation. Take a look in Adventure.GetInputVector - your custom movement type (which would inherit from Adventure to make things simpler) would need to use the same initial logic, with the extra step of rotating the Vector2 around the y-axis by the camera's current rotation.
 
Top