Vertical look direction aim pitch

navimicich

New member
Hi, I'm using topdown and playing around with the vertical look direction. I can fire to different heights set by mouse ray but the character animation does not rotate the weapon pitch like in combat view. I'm tying to link these together or set raw animation aim with public variable e.g. 45 degrees while not effecting top down camera angle. Im a beginner, but can usually find a way... Ive dug through combat and thirdperson viewtype to try replicate effect, I edited topdown viwetype like this...

public override float Pitch { get { return m_Pitch; } }
public override Quaternion Rotate(float horizontalMovement, float verticalMovement, bool immediateUpdate)
{
m_Pitch -= verticalMovement

Now the Pitch is updating with mouse vertical in the animator parameters but animation not raising lowering weapon.
I'm not sure which function to override or how connect look direction with aim animation? or is this rotation happening in movement type?
Any hints in the right direction would be appreciated.
Thanks
 
The aiming is done by the CharacterIK component. The LookDirection method will return the direction that the character should look.

Hopefully that points you in the correct direction :)
 
Top