Changing a 3D object's position on a 2D sprite based on its current animation frame?

Is this a possibility? I have a 2D sprite character that has a 3D string mounted on top of her head. This is fine if she doesn’t move, but what if she were to duck? Obviously, the string wouldn’t know that the sprite character is ducking to appropriately reposition to the top of her head.

Is there a way that I can determine where the mounted 3D object will be positioned based on the sprite’s current animation frame?

I wanted the sprite to have a dynamic element to it, using physics, to give it a unique depth. Would rather do this than to pre-render the string’s animation. I appreciate any help whatsoever.

Hi there,

is your sprite just a single sprite or made out of parts?

It would be easier to understand problem if there as a bit more info.

If it’s made out of parts, then it would be just a matter of parenting dynamic object to head.

If however, it’s a single sprite + frames, you’ll have to DIY.

Maybe create an overlapping rig that animates along with sprite in tandem, and move/animate it with same code you animate the sprite. Sprite is just like any Transform, you can make it have empty nodes to use for setup purposes.

1 Like