#### Archived

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

# Translating with Direct3D

This topic is 5911 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
G''day!
(in pseudo-code, ''cuz I''m lazy)
Build CarMatrixSet CarMatrixDraw CarBuild SpaceshipMatrixSet SpaceshipMatrixDraw Spaceshipetc.

1. 1
2. 2
Rutin
20
3. 3
4. 4
frob
13
5. 5

• 9
• 13
• 10
• 9
• 17
• ### Forum Statistics

• Total Topics
632601
• Total Posts
3007349

×