Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Rotatetowards bugged in 5.5.0f3? [android]

Discussion in 'Android' started by mobidus, Jan 22, 2017.

  1. mobidus

    mobidus

    Joined:
    Mar 22, 2016
    Posts:
    22
    So I upgraded to 5.5.0f3 (from 5.3.3f1) earlier this evening and I ran into a silly issue when testing. First I thought my input controls wouldn't work because my character nolonger moved, but after some digging I found that this particular if-statement returned some odd results on android

    Code (CSharp):
    1.  
    2. if(rotator.rotation != Quaternion.Euler(tVector))
    3.  
    4. {
    5. angle+=(Time.deltaTime*speed);
    6. rotator.rotation=Quaternion.RotateTowards(rotator.rotation,Quaternion.Euler(tVector),angle);
    7. }
    8.  
    I've added a screenshot that outputs the from/to values once the cube has completed its rotation.
    This does not occur on pc nor does it in 5.3.3f1.

    Is this a bug? Has something changed in 5.5?
     

    Attached Files:

  2. mobidus

    mobidus

    Joined:
    Mar 22, 2016
    Posts:
    22
    Bump. Can anyone confirm or is it better to file it as a bug?

    I have, in the meantime, changed it to compare angles, but that is not a safe comparison either