A question about SRotationKey

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
JunkerKun
Posts: 97
Joined: Mon Jan 28, 2013 12:52 am

A question about SRotationKey

Post by JunkerKun »

Hello.
I'm trying to implement my own animating system by getting all rotation keys and then setting proper rotation to a joint.
However I'm stuck at the first step. I just can't get all existing keys. Now, the model is fully keyed, meaning that for each frame there is a keyframe. But whenever I try to get SRotationKey there are different keys numbers for each joint. What the heck? Now I've checked this: http://irrlicht.sourceforge.net/docu/st ... n_key.html
and it seems that "frame" is what I need to get but... it doesn't really work as it supposed to.
So the question is: what exactly is "frame" here and why do I get different keys numbers for different joint when there are keys for each frame? And what do I need to do to get what I need? (All of the rotations for each frame for each joint).
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: A question about SRotationKey

Post by CuteAlien »

I think redundant keys are removed. So get 2 keys and check previous - next. If your frame in between 2 identical values then it's identical as well.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
JunkerKun
Posts: 97
Joined: Mon Jan 28, 2013 12:52 am

Re: A question about SRotationKey

Post by JunkerKun »

Ah, that explains it. Just cloned all the frames that were removed. Works like a charm.
Post Reply