Source for child following parent

Could someone please help point out the area in the Babylon.js source code where a child node/mesh follows the position and rotation of its parent via matrix math?

I was looking into transformNode.ts, though I’m unsure if I’m on the right track.

Thank you for your help :slight_smile:

It would be great to explain what you’re trying to accomplish as there are many ways to go about it. You could simply attach a TransformNode like you say and let the engine do the maths. :grin:

1 Like

You’re right :slight_smile: I’m curious about how to do this math manually

I’m working with a Physics world that’s separate from Babylon rendering and am interested in the creating a sticky spike grenade like in Halo, where the object sticks to and follows another object’s position/rotation

For the separate Physics world, I’d like to stay away from creating parent-child relationships for the object and spike grenade. Instead, I’d like to manually update the position/rotation of the spike grenade to follow the object

2 Likes

think we need to deal with the local quaternion problem.

1 Like

Thank you for looking into this, @11128 :slight_smile: Indeed, it looks close with a slight rotation issue

Your Playground reminds me of the post: How weapon is attached to a rigged animation - #3 by gbz

I think this place in the source is it or getting warm

2 Likes