- Home /
Get values of highest \ lowest points on an animation curve?
Is there an easy way to get a list of the highest and lowest transform keyframes from an animation curve (in the Animation view), along with the times of those particular keyframes, for a given animated object?
I am using FBX animations for a character, and I would like to get these values for some bones on the character, such as the hand. There are numerous keyframes in the hand animation but I just want to know the values\times of the highest or lowest transform keys in the curve, so I can script accordingly with that information.
All answers are appreciated. I'm using Javascript, so please answer with that if at all possible. I think my brain is about to melt trying to figure this out.
Answer by Bunny83 · Jul 09, 2014 at 04:15 AM
Do you mean the highest and lowest position in worldspace? That would involve the whole bone hierarchy and you can't just read out that information. Character animations are usually done by rotating the bones (like real-life bones and joints). There usually aren't any position data in the animation. The end-position of your hand is the result of calculating forward kinematics of your bones.
The easiest (maybe not the most accurate) way would be to slowly increase the animation time and sample the animation manually and analyse what your hand is doing.
If you ment something else, please let me know.
Hmmm, yes, you're correct, thank you. I hadn't thought of that. In that case I would need the localRotation value for each keyframe and not the localPosition value.
Basically I just would like to know how to get the x, y, or z value of a given keyframe from an animation curve in the animation view. I hope that makes sense!