Sign in to follow this  

PhysX- shapes of a compound object get stretched if i localy rotate them

This topic is 3103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I've already posted this problem on the offical nVidia PhysX forum, but I still didn't get a solution to it, so: I'm having a problem with localy rotating shapes-> They don't rotate properly, they "twitch" and get scaled (squeezed toghether) by some random axis. I've tried inverting matrix multiplication order but it doesn't help. This problem also happens if I use the NxMat33::toQuaterntion and fromQuaterntion, so that I use quaterntion multiplication and rotation. This happens to models that were exported from 3DS Max and those that I hardcoded into my program. Here is some code:
NxMat33 m1,m2;
m1=myShape->getLocalOrientation(); 
m2.rotZ(angle); // Apply some rotation to an empty matrix
m1=m2*m1;   
myShape->setLocalOrientation(m1);

Share this post


Link to post
Share on other sites
Do you normalize the orientation at any point? Perhaps it's numerical drift that you're seeing.

[Edit: If that is in fact the problem, it's something you'll probably need to address regardless of what physics library you use.]

Share this post


Link to post
Share on other sites

This topic is 3103 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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