jeffreylanters / unity-tweens

An extremely light weight, extendable and customisable tweening engine made for strictly typed script-based animations for user-interfaces and world-space objects optimised for all platforms.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

There's a slight problem for "TweenRotate " -> The actual effect is not consistent,valueFrom should be finished at "OnInitialize "

shinedo opened this issue · comments

I'm not sure what you mean, can you provide an example?

Thanks for your report,I've tried your code and get the same buggy results. It seems to have something to do with the rotation to euler calculation. I'll be looking into it!

// This doesn't work
transform.TweenRotation (180, 3).SetDelay (1).SetEaseQuadOut ();
// However this does work
transform.TweenRotation (new Vector3 (180, 0, 0), 3).SetDelay (1).SetEaseQuadOut ();

Using EulerAngles directly can cause unexpected behaviour when trying for example rotate from -1 to 1

Are you sure about TweenRotation as well? this.transform.TweenRotation (new Vector3 (180, 0, 0), 5); works perfectly fine for me.

Can you test your code when attaching the TweenTests component to a cube and run these tests:

image

That's right, I'll try to

It's works perfectly fine for TweenRotation.
It's works wrongly for TweenRotationX when valueTo is 180 or -180,
then the other normal operation