Godot only updates the first rigid-body in Kinematic mode child of a rigid-body in RigidBody mode

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By dotty

I have been playing around with kinematic-mode rigid-bodies as children of rigid-body-mode rigid-bodies and found only the first Kinematic child transform will update as its parent moves.

It seems like any subsequent children might be updated normally but something later snaps it back. I suspect some bug where information from bullet is pasted over godot placement.

It also suggests that the first node’s (expected) behavior might be an undesigned side effect. So I can work around the situation but should one expect that a kinematic child’s transform is updated like a regular 3d node?

stupid question but, why do you even need a body to be child of another body?

Andrea | 2021-03-21 21:17

It’s more of an experiment. You can detect bodies entering Areas but Areas contain no provision for saying where in its volume the intruder is. So I played a little with using kinematic rigid bodies for that purpose which is more of a dead end at least for my purposes. (They do detect intruders, but the location can be on the ‘far’ side wrt to the rigid-body’s center, reflecting the purpose of collision detection in bullet. KinematicBody has move and collide but the call is SLOW, worse is test_move.

However, if the modality of a rigid-body is kinematic, there “should be” every reason why it be like any other dumb spatial and have its global transform be a product of its parent and local transforms.

And I can conjure an odd use case where you want your parent body to be physics driven but want it to control kinematics in order to “break” pure physics relations. The kinematics can do collision-y things to the world but not effect the parent. Call it ninja magic.

dotty | 2021-03-21 22:58

in my experience, modes of the rigid body do not chage the nature of the node, they simply fix some constraint to let they “look” similar to the static body, or kinamatic body.
said that, unless the error is somewhere on your code, you might have found a bug in the update of that first child.

You can detect bodies entering Areas but Areas contain no provision… …but the call is SLOW, worse is test_move.

have you tried with raycast?
i still dont understand why you need a rigid body inside a rigid body though XD

Andrea | 2021-03-22 09:07