Author Topic: animations  (Read 4893 times)

1024

  • Guest
animations
« on: July 30, 2009, 02:28:59 AM »
Hi again,

I'm stuck with a finishing animation I'm trying to do. It involves rotating and I can't deal with these quaternion numbers. Basically, I'd like to rotate an element in one axis but for some reason after it does, it keeps scaling the model wierdly, depending on the w axis number, (at least according to the documentation it is w axis). The thing is I'm not a native English speaker* and I don't have time to get involved with serious math here. So how do I rotate that thing without messing up?

Note: this is for my 1st puzzle, I'm not trying to make it complicated but this would be a nice finishing touch on it. Everything else is done for it, except for setting time/move numbers.

*Should I write the Hungarian localization?

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: animations
« Reply #1 on: July 30, 2009, 09:43:41 AM »
Quaternions definitely take some getting used to.  I'd suggest trying to use the second animation type instead.  Here is an example animation that rotates around the x-axis by 3.14 radians (180 degrees) starting at time 30 (1 second after finding the solution) and ending at time 60 (2 seconds)
ANIMATIONCOUNT 1
ANIMATION {
  RX 2 {
    30 0 0 0
    60 3.14 0 0
  }
}

To rotate around a different axis, replace RX with RY or RZ.  Also replace the start and end times and the end rotation to get different animations.  The two 0's at the end of each line are derivatives.  By making them 0, we basically just mean that the rotations will start and end smoothly.

  - Rob

admin

  • Rob
  • Administrator
  • Widgeteer
  • *****
  • Posts: 218
    • View Profile
Re: animations
« Reply #2 on: July 30, 2009, 09:59:49 AM »
*Should I write the Hungarian localization?

That would be great!

In case you're interested, I just put up a new template for Hungarian at http://www.lazy8studios.com/wiki.  New translations are always appreciated!  As a warning: Even after translations are completed, it often takes me and Brendan a long time to create art assets with the new text strings.  But we should have at least 5 new language packs coming out within the next two weeks.

1024

  • Guest
Re: animations
« Reply #3 on: July 30, 2009, 01:13:34 PM »
I have to report my experiences with the animation code you gave. First it hardly moved. Then I changed number to 90 which made it turn 90 degrees precisely so I believe you were wrong just a bit, also in the documentation examples. But thanks as it worked now, I didn't check the second type of animation because I thought it was for different purposes than the first.

edit: finally I got the desired finish animation, I guess that's one more lesson done here, thanks.

also, tried to edit the localization at the wiki, but it wouldn't let me. I registered but something's wrong.
« Last Edit: July 30, 2009, 02:01:26 PM by 1024 »