Parenting NodePath to a model's joints

Good morning.

I’m currently trying to find a way to reparent a model to a bone defined in another model (e.g: a character take a weapon, the weapon’s model must be attached to some part of his body).

It seems it might be doable using the Character class, but I’m not using it right now, and even if it was the only solution I didn’t find any information on how to use the Character class :confused: !

Right now I’m trying to do it using the PartBundle from an AnimControl that was set on the model… but it doesn’t look like a suitable solution.

Isn’t there an easy way to do this using the C++ API ?

Yes, there a way. If I understand correctly, you want to do what’s in the Looking and Gripping tutorial. If so, I’ve written a C++ version that you can find here, filed under looking_and_gripping:

Precisely what I was looking for (and even more) !
Thanks a ton !