Archived

This topic is now archived and is closed to further replies.

PGstudio

Translating with Direct3D

Recommended Posts

hi guys... i´m having a problem translating one object in my scene with 3 objects( a car, a spaceship and the Level ) i´m using this code to translate each object: D3DXMatrixTranslate ( X,y,z , &MatrixCar ) // for the car . 3DDevice->SetTransform( D3DTS_WORLD, &MatrixCar ); D3DXMatrixTranslate ( X,y,z , &MatrixSpaceShip ) // for the SpaceShip . 3DDevice->SetTransform( D3DTS_WORLD, &MatrixSpaceShip ); D3DXMatrixTranslate ( X,y,z , &MatrixLevel ) // for the Level . 3DDevice->SetTransform( D3DTS_WORLD, &MatrixLevel ); Is it wrong ??? When i move the car, the Spacehip moves.. when i move my level the car moves.... i monitored the coordinates of the 3 objects and they are all ok... i think thr problem is that D3DTS_WORLD transformation with 3 diferent matrices... I tryed to multiply all objects matrices and then use the result matrix as the world.... but it didn´t worked.. : ( Any solutions ??

Share this post


Link to post
Share on other sites