Updating Bone Transform Matrices

Recommended Posts

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:

  1. use some kind of goToFrame() function (which I couldn't find for skeletal animations, also it is hard to control speed this way)
  2. 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

//Characters current state



Share this post

Link to post
Share on other sites

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:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.