Fixed Constraint Effects on Motion #1077
Replies: 2 comments 1 reply
-
A fixed constraint will effectively cause their masses to be combined (but not in a way that reflects in any getter API), so if you add force to 1 body it will affect the other body. Due to how the constraint solver works, this is not a perfectly rigid connection though (it is a very stiff spring, but is springy nonetheless). If you want a perfect rigid structure then you should use a compound shape. This is also cheaper to simulate. Reasons for using a fixed constraint could be that you want to be able to measure the forces between the two bodies to be able to cause them to break apart if the force is too big. |
Beta Was this translation helpful? Give feedback.
-
Ok, so far that makes sense. What about if I I have some main body (a space ship, say), and I want to attach some sensor bodies to it. Will attaching them with a fixed constraint have any effect on the motion of the main body? I'm hoping that, since they're sensors, it will not. |
Beta Was this translation helpful? Give feedback.
-
Let's say I have a large free-floating physics body that represents a space ship. This space ship has engines that apply forces to itself.
If I attach another body to it with a fixed constraint, does the simulation treat them as one body, combining their masses together and recalculating center of mass and such? Almost as if they were combined into a mutable compound shape? Or is the second body treated as massless?
Or maybe more specifically: Will the attachment of a second body via a fixed constraint effectively change the resulting motion of the main body when engine thrust is applied?
I realized, while working on my systems, that I wasn't sure, and I couldn't find anything relevant in the documentation or in the other discussions. I might be asking a bad question based on a misinformed premise, here, too.
Maybe it all boils down to a misunderstanding I have about fixed constraints, and what makes them fundamentally different than combining shapes into compound shapes.
Beta Was this translation helpful? Give feedback.
All reactions