I have a model, that is move in game by this script:
void Update ()
{
if (Walk == true&&transform.position!=Target.position)
{
float step = Speed * Time.deltaTime;
transform.position = Vector3.MoveTowards(transform.position, Target.position, step);
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation (Target.position - transform.position), RotationSpeed * Time.deltaTime);
At the same time I try to play an animation, that I imported from 3dmax (fbx).
The problem is, when I use the script without the animation, the model rotates in the direction I need, facing towards the point of movement. But when I use the animation (basic walking animation), the model faces the opposite direction when moving.
I have no idea why can this be happening, so I have to ask for help)
Thanks in advance!
or aligned to the way you are innitaly facing when starting your scene
– exvalid