Characters Picking Up Objects using Set Parent Bone Node

Hi,
I’m working on a mechanic where characters can pickup objects and move them. In native Blender you can easily do this using the ‘Child Of’ bone constraint and set the inverse, which parents the object to the bone and applies the inverse transform so that the object doesn’t snap to another location when the parent is applied.

I’ve been using the ‘Set Parent Bone’ node to parent the object to the arm bone. However, the object’s transform orientation is now affected by the transform of the parent bone. I can set the transform to 0, but this will only move the object to be directly aligned with the bone, not the position it was in before it was parented. Basically, I need help calculating the transform that will move it back into place. Any ideas?
image
ChildOfSample

Thanks,
Tim

1 Like

Hi,

How about something like this:

  1. Add an empty object to the bone and make it the child of the bone. This can be done in Blender UI using child of constraint (or using nodes if you prefer). Check some bone animation examples if needed.

  2. When you need to pick up an object, make this object the child of the empty object. That way, the relative positions of the empty and the child object remains the same without “snapping”.

1 Like

Thanks Quantum,

That works perfectly! A quick but important note: ‘Parent Inverse’ must be ticked on the ‘Set Object Parent’. I haven’t tried dropping the object, but I think it should work the same way.

Thanks again!
Tim