Giter VIP home page Giter VIP logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
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 [email protected] on 24 Jul 2012 at 9:32

  • Changed state: DataNeeded
  • Added labels: Type-Defect
  • Removed labels: Type-Enhancement

from hotween.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024

Original comment by [email protected] on 24 Jul 2012 at 9:32

  • Added labels: Priority-High

from hotween.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
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 [email protected] on 24 Jul 2012 at 1:56

from hotween.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
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 [email protected] on 24 Jul 2012 at 7:35

  • Changed state: Invalid

from hotween.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
oh my. didn't know that. thanks :)

Original comment by [email protected] on 24 Jul 2012 at 11:15

from hotween.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 2, 2024
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 [email protected] on 25 Jul 2012 at 9:01

from hotween.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.