Sign in to follow this  

making sense of physx joint drives

Recommended Posts

I'm wondering if anyone here has actually used joint drives in the physx engine and can help me out with this problem. I'm trying to set the joint orientation with setDriveOrientation to a quaternion in the global frame, but everything I set it to seems to give me completely illogical results. the default orientation(identity quaternion) drives the joint in the direction of the first actors joint axis. So if I have a quaternion of the joint axis and I set the drive orientation as the inverse of that quaternion, the debug renderer shows the axis of the joint drive to be facing straight up, as in an orientation of 0(identity) in the global frame. This is what I want, so that I can multiply it by whatever quaternion and get it to have that as its global orientation. The problem is that the drive axis shown by the debug renderer is not what the joint actually drives towards, it seems to be only a relative rotation from the joint axis that defines the twist, swing1, and swing2 axes as x, y and z. Maybe I just don't know enough about quaternions but I can't find any way to translate the quaternion. Thanks

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this