mkadirtan Posted September 14, 2018 Share Posted September 14, 2018 Hello everyone! ? In my BJS project, it is possible to key a characters position in the timeline. I achieved this result using GSAP Timeline tool. However, for my system to be consistent I need to control skeleton animations via same timeline. My solution ideas: use some kind of goToFrame() function (which I couldn't find for skeletal animations, also it is hard to control speed this way) Manage skeleton animation using a nested timeline. My problem is that: I've found the way bone animations are recorded. If I'm correct "_localMatrix.m" value is being updated during animation. However, I couldn't manage to update it manually. What am I missing here? What does "_" in a variable name tell me? Thanks in advance! //Loaded animation data myCharacter.skeleton.bones[i].animations[j]._keys[k].value.m //Characters current state myCharacter.skeleton.bones[i]._localMatrix.m Quote Link to comment Share on other sites More sharing options...
kcoley Posted September 14, 2018 Share Posted September 14, 2018 Hi @mkadirtan! Usually an underscore '_' in front of a variable name is something that should not be used publicly. Though you can try moving all of the skeleton animations to an AnimationGroup. That way you can call .goToFrame(frameNumber) to go to the frame you want. Here is an example playground: http://playground.babylonjs.com/#6A4VD7#3 GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.