Hello there!
I want make a first-person fake body, which connected to third-person body.
So, It should play same animations as 3rd body.
How can I detect which MovementAnims is using by 3rd body at the moment?
I have tried to make it via angle between Pawn.Location and Pawn.Acceleration, but it works terrible
Will be great, if it will be same as 3rd-body, I think the way with angle will look different
I want make a first-person fake body, which connected to third-person body.
So, It should play same animations as 3rd body.
How can I detect which MovementAnims is using by 3rd body at the moment?
I have tried to make it via angle between Pawn.Location and Pawn.Acceleration, but it works terrible
Code:
local float fPointAngle;
fPointAngle = Acos(Normal(vector(Pawn.Rotation)) dot Normal(Pawn.Acceleration))*180/PI;
if( fPointAngle > -45.0 && fPointAngle < 45.0 )
Anim = Pawn.MovementAnims[0];
else if( fPointAngle > -135.0 && fPointAngle < 135.0 )
Anim = Pawn.MovementAnims[1];
else if( fPointAngle > -135.0 && fPointAngle < -45.0 )
Anim = Pawn.MovementAnims[3];
else if( fPointAngle > 45.0 && fPointAngle < 135.0 )
Anim = Pawn.MovementAnims[2];
Will be great, if it will be same as 3rd-body, I think the way with angle will look different