Page 1 of 1

Rotations via forces

Posted: Mon Jan 03, 2011 7:46 pm
by seabert
Hello Norbo!

I'm trying to change the orientation of an entity to match a given quaternion.
Unfortunately I'm unable to directly set the orientation so I need forces to do this.
None of my attempts were really satisfying. Some were doing the job but too slow, and cranking up the force ruined the stability.
Mind you, this entity has some others attached to it with joints, and they make it quite difficult to control!

So given an orientation quaternion, how can I rotate an object to match it?



Thanks a lot in advance! :D

Re: Rotations via forces

Posted: Mon Jan 03, 2011 9:17 pm
by Norbo
It is possible to directly set the orientation, but you're right to avoid it in this situation. Since it's connected to joints, the most stable option would be to use another joint. The SingleEntityAngularMotor should do the job. It has both a velocity and servo mode (accessible in its Settings property). When in servo mode, you can define the desired orientation and it will do work to achieve that state.