Jump to content

Creature: Transform a bone's localposition to world position


Recommended Posts

Hey everybody,

I need a little help with using the Creature game object from Kestrel Moon Studios.

What I've got so far:

My html page: http://ellioman.games/test/c/
The code: https://gist.github.com/ellioman/e508aacd4f07028645aa126bc5474d06

What I'm trying to do:

Get the bunny sprite (that you see in the top left corner) to follow a bone I've retrieved from the creature object. I use the "bone.getWorldStartPt()" function in Creature to get the position of the bone but the problem is that the position I get is the character’s world space (local-position).

I therefore somehow need to inverse the transformation of the position gotten from getWorldStartPt() so I that have the world position that will be used to position my bunny texture.

Does anyone know how I can accomplish this?




Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...