- Home /
Question by
infinitypbr · Jun 08, 2014 at 08:15 PM ·
animatortransform.lookat
transform.LookAt/Animator together taking 20ms in Profiler
Hello,
I have an large amount of time spent on Physics.Simulate in the profiler, so I started trying to figure out how to turn it off/on. I finally narrowed it down to one line of code: transform.LookAt
However, this only happens when the animator is also turned on. The animations aren't anything special or different, and are running as expected.
If I comment out this line, the physics.simulate drops to 0.24ms. If, that is, the animator is turn off. If the animator is on and the transform.LookAt is on, physics.simulate takes a long time. Otherwise it doesn't.
And I can't seem to figure out why. Any thoughts?
Thanks!
Comment