Jump to content
  • Advertisement
Sign in to follow this  
Yourself

convert matrix

This topic is 3164 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

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
Advertisement
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
If I remember my math correctly, you can put the translation in there, too, and convert it all in one line.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!