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

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 on other sites
I'm not positive, but try something like this:

M1^(-1) * M2 * M1

Or the reverse order of that.

Share on other sites
Still nothing, thanks anyway.

I've decided to switch over to Havok anyway since it has a lot better asset pipeline (from 3ds max to game).

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 on other sites
Are you rotating static objects or dynamic?
Cause there are some problems with static one (its not allowed to rotate them).

Create an account

Register a new account

• Forum Statistics

• Total Topics
627734
• Total Posts
2978841

• 10
• 10
• 21
• 14
• 12