Skip to main content
gamedev.net
🔒 Locked

Changing vector by matrix problem

Started by drb2k2 Mar 3, 2004 at 1:21 PM 0 replies 150+ views
Original Post
drb2k2
drb2k2
Hi all, I am new to this and have a problem that I thought would be simple, but it appears not to be. I want to test collisions between objects. I have the Min and Max vectors of the mesh. However these values were those obtained from the model at the origin. My object has the following attributes: A D3DXVECTOR3 for its position, A D3DXVECTOR3 for its rotation, A Matrix that is the result of position and rotation What I would like to know is how do I update the Min and Max vectors so that they stay current with the model. I realise that when I increase the x,y or z values of the mesh I could also increase these points, but this sounds like it would slow things down to me. I would much rather just get the info from a matrix. Any help as always is greatly appreciated. Cheers Drb2k2
de_matt
de_matt
Keep the original values and every time you want to find out the actual Min / Max vectors use D3DXVec3Transform (someat like that). Don''t copy the resulting vectors in to your min / max or things will go wrong. Keep your min / max as the originals.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.