Rotations via forces

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
seabert
Posts: 11
Joined: Sun Aug 29, 2010 10:33 pm

Rotations via forces

Post 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
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Rotations via forces

Post 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.
Post Reply