Mecanim LookAtPosition Behaviour on IOS

Hello everyone,

currently I am developing a mobile game containing a dialogue system with mecanim driven characters looking at each other as long as the dialogue lasts.
I use Animator.SetLookAtPosition() for that.

However, the characters behave differently on IOS Devices than they do in the unity editor, after a brief amount of time every character starts looking right above their targeted transform.

After a long trial and error session i decided to take this issue to the forums, since this seems like a bug to me.

I prepared a little ugly example Scene, which you can find attached to this post.
There is a pink bar parented to a mecanim driven characters head, touching the screen (or holding down the mouse) makes him look at his target (black sphere).

If you keep your finger on the screen you will see the pink bar will never reach down to that point again, where it was right at the start of the scene. I bring it up again, this only happens on the IOS device. Editor is fine.

Any help is greatly appreciated.

1193252–47302–$LookAtBug.zip (9.52 MB)

This is ridiculous! :frowning:

The Character looking correctly at the black sphere transform , but
Time after time he is slowly rising up, after about 1 hour wait he is completely clamped to staring in the sky! (See below)

Start of the Scene:

50 Minutes later:

There is just one simple script in the scene setting the LookAtWeight and LookAtPosition every Frame, nothing else.
This just happens on the mobile Device, Editor is fine

Furthermore, I attached my Project Folder to the first post hoping someone can figure this out or declare it as a bug.

Thanks.

Only Workaround to this is using Transform.LookAt in LateUpdate() … which is still stupid as hell.

Still have no idea, what the cause of this bug could be.

Sorry for bumping this thread again, I still hope someone takes a look at my scene and might point out something.

Best Regards.

Since you went to the trouble of making a repo scene why not send it as a bug report using the bug reporter ?

I mentioned this in a related thread:
I’ve managed to make the problem go away by swapping out the animator controller every minute or so, when my game allows a convenient place for doing the swap. I believe this is a precision error of the mobile device since I never see this happen on the PC.

I just reference a different controller in script using:
var runtimeAnimatorController : RuntimeAnimatorController

then swap using:
Animator.runtimeAnimatorController

I supposed you can even swap to a copy of the original controller, to keep things simple, but I’m not sure what happens to memory, I mean if all new clips are put in RAM or not.
Also, were you able to get a bug report submitted? If I have time I will try to send in something, but time is hard to find right now.

Sorry for the late reply, but yeah, I did send away a unitypackage regarding the bug.

Hopefully this gets fixed soon.

Thanks for the extra Workaround.