Sign in to follow this  
Yourself

convert matrix

Recommended Posts

hi all, I'm using the PhysX libraries for collision checking in my project but I come upon a problem... I need to set the matrix of the visual object the same as the matrix of the PhysX actor and that's were it goes wrong : my X-axis is the opposite of the one that PhysX uses so everything is mirrored. for translations, this isn't a problem (just reverse the x value) but for the rotations it is.. so, how can something like this be done? I tried some stuff but it all doesn't seem to work :( thx PS.: I'm not using DirectX / OpenGL and trying to change the direction of the X-axis is NOT an option

Share this post


Link to post
Share on other sites
This is off the top of my head, kind of a drive-by posting.

Create a scaling matrix M for x=-1, y=1, z=1. This is nice because M==M-1.

Given a rotation matrix R, R' = M*R*M.

I think that should work. If not, hope not too much time's wasted.

Share this post


Link to post
Share on other sites
Quote:
Original post by Buckeye
This is off the top of my head, kind of a drive-by posting.

Create a scaling matrix M for x=-1, y=1, z=1. This is nice because M==M-1.

Given a rotation matrix R, R' = M*R*M.

I think that should work. If not, hope not too much time's wasted.


That worked perfectly :)
thank you very much :)

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