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.
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)
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.
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.