How could i more or less force a specified Rotation?

Well I have a Dynamic node and I have a quaternion wich stores the rotation I want to have, any suggestions how I can create a Controller that is doing this without forcing the node (aka not set Rotation, but apply forces)

Kinda like this one, but only for rotation (well position would be nice, but it is not really important)

Well, maybe someone else might  be a bit more knowledgeable, but I'm gonna fire at this one.

You may not be able to.  See, JMEPhys doesn't have the object's moment of inertia built in as a concept.  That's kinda left up to the individual physics implementations.  Unfortunately, that makes it a wee bit tricky to do what you're trying to do.

Normally, I'd tell you to calculate the amount of torque you need (angAccelNeeded * momentOfInertia or something like that, but more evil to compute) and then apply it.

Unfortunately, you have no way to know.  I think if we ever go through and tweak the core of JMEPhys, that'll be taken care of, but . . . for now, you're kind of stuck playing with the underlying physics implementation.

Maybe if this is a fairly common need, we could build some utils for it.  DynamicPhysicsNode.applyNeededTorque(Quaternion targetRotation, float maxAngAccel) or something like that.

But . . . for now . . . gonna have to build it yourself or wait, I think.

As a side note, why you needing to apply force, vs. forcing the node?


Well i try to get a Spaceship mousesteerable in a way it fells mostly realistic.

When i do this over Force/Torque, ect with a clamped power,

after a collide it will need a few seconds before ti si stable again, I can't see another way to archive this.

But assuming i get the torque from the underlying system, how could I calcualte that then?