I've got an object that the player controls indirectly. The set an orientation they want the object to face and then this object attempts to match that point using torque forces to rotate. Position is static for the object, and all rotation occurs about the local X-axis.
There seem to be two options here.
- One is that the player updates a orientation that the body is constrained to and it attempts to "correct" it's position to get back in line with the constraint.
- The other option is to have the controller handle the interpretation between the player defined point and the body's current orientation.
- I could obviously just slam the orientation directly, but that bypasses the physics system which I don't want to do.
Is either of these preferred?
Additionally I'm having trouble figuring out a smooth way to calculate the torque needed to get the two orientations to align. I can nudge it slowly in the right direction until it gets there, but that's not what I'm looking for as I need it to get there rather quickly. Any help here would be appreciate as my Vector/Matrix/Quaternion math skills are lacking.