Hi guys, i’m trying to make a third person controller like in fornite, it’s pretty much done but i still can’t figure out how to play character’s underbody turning animation
Get the angle between the camera and the players forward position
void Update()
{
var cam = Camera.Main.transform;
Vector3 targetDir = new Vector3 (0, cam.forward.y, 0);
float angle = Vector3.Angle(targetDir, transform.forward);
if (angle < 10.0f)
DoTheAnimationSequence();
}