Thanks for the replies so far folks!
The example i provided is just a toy, what i am ultimately aiming to do is use the physics engine to do a low-fi simulation of a simple RC aircraft where i’ll be needing to specify the forces acting on a number of bodies. Bodies will represent things like motors, wings/control surfaces, ballast masses etc, and I want to attach the bodies in fixed positions to simulate the rigid body kinematics of the craft. I’ll need to specify the mass of each sub-body, as well as forces on each sub-body calculated from the sub-body’s velocity, orientation, etc. Collisions are not really relevant actually, but it will be convenient to have direct access to all of the methods of each individual sub-body when making these calculations.
I initially experimented with setting the various objects to all have one
parent, but when you do that, forces seem to be applied in the parent frame (or maybe the world frame, i haven’t investigate this full, but in anycase, it’s not in the body’s local frame). Conceptually, it is much simpler if i can apply forces in the individual body frames of each sub-body.
And indeed, i have this working exactly as intended… until i try to rotate the bodies. If i use a LockJoint to fix the sub-bodies in relative positions, everything works just right and the simulation performs as intended when i apply the desired forces to the various bodies… but when i try to rotate the bodies before applying the LockJoint, i get weird behavior.
I’m sure there are a number of ways to accomplish this, but for the sake of argument: if i want to use LockJoints to fix the position and orientation of a set of bodies, how might that be done? Is it possible?
(FWIW, i’ve read the docs, googled, and perused the source on github extensively and I’m quite stuck… but not for lack of effort )