Hello Unity community,
I’ve run into a very disturbing issue today.
I downloaded the Zombie Character pack and a few animations today and I am desperately trying to fix this weird bug.
So basically, if you rotate an object in a scene, it should not move (only rotate towards you, duh…) . But when i rotate this Zombie model it starts to move towards the direction its facing with a speed of ~ 0,1/s.
I’m sure it has to do something with the rotation and the model itself, because when i comment out the rotation code it does not do it, but the same code does not provoke such a behavior for e.g. a cube.
Another thing is that when i get closer the whole model starts to rotate up to face the main camera, so my second question would be how i can make him rotate only on the x and z axis (note : rigbody fix y rotation does not work for me :S)
Code :
Rotation:
myTransform.rotation = Quaternion.Slerp(myTransform.rotation,Quaternion.LookRotation(target.position - myTransform.position),rotationSpeed * Time.deltaTime);
Additional codes used:
Character Controller (standard asset),
Root Motion Computer,
Normal Character Motor
Note: This does also happen when i disable any animations!
Thanks in advance, if you need any more code or details please ask, i want to get rid of this issue as fast as possible.