• Advertisement
Sign in to follow this  

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

This topic is 3178 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
Advertisement
I'm not positive, but try something like this:

M1^(-1) * M2 * M1

Or the reverse order of that.

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement