Why does transform.LookAt move the character when using rootmotion?

Hi,

I am not sure if I am missing something or using this wrong… but I have a character that uses mecanim rootmotion.

Why is it when I try and get this character to look at a particular object it always moves towards this? How do I make it look at the object without having it moving the character.

transform.LookAt( new Vector3(sphere.transform.position.x, sphere.transform.position.y, sphere.transform.position.z) )

I’m a little worried… does nobody know the answer? or does nobody use Mecanim and rootmotion for moving characters around. :eyes:

um slightly unrelated but the code that you posted above is kinda weird, you’re unnecessarily constructing a Vector3, it should be transform.LookAt( sphere.transform.position ); instead :slight_smile: . Good luck on solving your problem though.