What's the best way to pin a rigid body to another rigid body?

Post Reply
s_kohan
Posts: 5
Joined: Tue Apr 02, 2019 9:11 am

What's the best way to pin a rigid body to another rigid body?

Post by s_kohan »

I have a simulation where the character model is a capsule rigid body which is moved by applying forces. I want to have another body which represents the hit box for a weapon which moves relative to the character body. I.e. imagine a sword blade which moves along a set path relative to the character, but that entire path moves and rotates with the character as it moves in world space.

What's the best way to accomplish this? I am thinking I could use a kinematic object and just update it after the character moves each timestep, but is there a better tool for this? Maybe I can use constraints?
User avatar
xissburg
Posts: 46
Joined: Sat May 19, 2007 9:28 pm

Re: What's the best way to pin a rigid body to another rigid body?

Post by xissburg »

I think using a kinematic object makes more sense. You could animate it in object space and then multiply its transform by the capsule's transform to calculate the final state of the hit box object.
Post Reply