- Home /
How to connect kinematic and non-kinematic Rigidbodies with hinges?
We're simulating a piece of machinery with a large, wheeled main body controlled by physics, and some arms attached to it. We have Rigidbodies in the arms for collision detectors, and a Rigidbody in the main body.
The arm GameObjects have Hinge joints, connected to the main body Rigidbody. We'd like the arms to be kinematic, but when we set that flag on them, they seem to hold the main body in place. For example, we start the machine above the ground, and it should fall. Even though we have the use gravity flags set for all Rigidbodies, the vehicle doesn't fall; it's like the arms are holding it suspended in air.
When we unset the isKinematic flag for the arms, the vehicle falls, but we need to be able to control the arms outside of physic using their transforms.
Has anybody else seen this behavior? Is there a work-around?
Im not sure I understood what you want but maybe you could simulate gravity of your kinematic rigidbody?
That's a good suggestion about simulating gravity.
$$anonymous$$y problem, (I think) is that the assumption seems to be that if you've got kinematic rigidbodies attached to non-kinematic rigidbodies, the kinematic rigidbodies seem to dictate position of the structure. I'd like the opposite: I move the non-kinematic rigidbody around using forces, and I'd like the kinematic rigidbodies to follow.
Hmm maybe something like removing the joint between the kinematic rigidbody and the others and just add a follow script?
Edit: Never$$anonymous$$d, seems a bad idea...
Are you sure you don't want to move your arm with Rigidbody.$$anonymous$$ove ?
Can't you set the kinematic flag off when you need it? (like some ragdoll mode when it needs to fall for example)
Your answer
Follow this Question
Related Questions
Rigidbody and Parenting - Kinematic Rigidbodies? 2 Answers
How can i change HingeJoint's axis from code? 0 Answers
How to make an arm with multiple, controllable joints? 2 Answers
Drag area from HUD 1 Answer
Kinematic rigidbody only triggering once 0 Answers