I have a problem with this code
when I press “S/DownArrow” the player does not rotate in that direction but to the right
while in the other directions it is correct
All this I tried to make it compatible with my FCR {Follow-CameraRotateWithClickRight-RotatePlayerMovement}
Can u help me xD pls
void Start()
{
lookAt = player.rotation;
}
void Animating()
{
Vector3 direction = new Vector3(moveHOR, 0, moveVER);
if (direction != Vector3.zero)
{
lookAt = Quaternion.LookRotation(direction);
player.rotation = Quaternion.Slerp(player.rotation, qTo, Time.deltaTime * rotationSpeed);
//anim.SetBool("walk", true);
}
else
{
//anim.SetBool("walk", false);
}
}