Sign in to follow this  
n3Xus

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 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

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