Closed GoogleCodeExporter closed 9 years ago
Thanks amugana for patching it. Before applying the patch though, could you
send me an example of a case where HOTween fails to apply the shortest
rotation? I can't replicate it here, and I want to be sure we have the same
thing in mind :)
Original comment by daniele....@gmail.com
on 24 Jul 2012 at 9:32
Original comment by daniele....@gmail.com
on 24 Jul 2012 at 9:32
i just checked the case.
When relative is 'on' rotation from '0' to '270' runs whole 270 degree
HOTween.To( transform, 0.5f, new TweenParms().Prop("localRotation",
Quaternion.Euler(0,0,-90), true));
Original comment by amug...@gmail.com
on 24 Jul 2012 at 1:56
I see. Then everything is correct, actually. Quaternions can't be negative, so
converting 0,0,-90 to a Quaternion actually creates a Quaternion of 0,0,270
(you can see it if you Log Quaternion.Euler(0,0,-90).eulerAngles), which in
case of a relative rotation tween, correctly rotates the object by 270 degrees.
You can instead directly use Vector3 values for rotation tweens, like:
HOTween.To( transform, 0.5f, new TweenParms().Prop("localRotation", new
Vector3(0,0,-90), true));
which will correctly rotate your object by 90 degrees.
Original comment by daniele....@gmail.com
on 24 Jul 2012 at 7:35
oh my. didn't know that. thanks :)
Original comment by amug...@gmail.com
on 24 Jul 2012 at 11:15
Thanks to you. Even if in the end we found this issue was not an issue, I
appreciated enormously that you included a patch :)
Original comment by daniele....@gmail.com
on 25 Jul 2012 at 9:01
Original issue reported on code.google.com by
amug...@gmail.com
on 24 Jul 2012 at 6:19