Ok basically I'm new to direct3d and have made a triangle pyramid (with texture) and also a sphere but my triangle is inside the sphere and whenevr I translate an object it translates both of them
All i want to do is seperate both objects and tell the program to just move one so I can move the pyramid away from inside the sphere.
How can the program tell what it needs to move, please help
Also I can't scale my object
// For our world matrix, we will just rotate the object about the y-axis.
// Set up the rotation matrix to generate 1 full rotation (2*PI radians)
// every 1000 ms. To avoid the loss of precision inherent in very high
// floating point numbers, the system time is modulated by the rotation
/// period before conversion to a radian angle.
UINT iTime = timeGetTime() % 3000;
FLOAT fAngle = iTime * (2.0f * D3DX_PI) / 3000.0f;
FLOAT tAngle = 130;
You can combine the scaling, rotation and translation matrices into a single matrix. The order in which you multiply the matrices is important:
D3DXMatrixScaling( &matScale, 500000.0f, 50.0f, 0.5f );
D3DXMatrixRotationX( &matRotation, tAngle );
D3DXMatrixTranslation(&matTranslation, 0.0f, 0.0f, 0.0f);
D3DXMatrixMultiply (&matWorld, &matScale, &matRotation);
D3DXMatrixMultiply (&matWorld, &matWorld, &matTranslation);
g_pd3dDevice->SetTransform( D3DTS_WORLD, &matWorld );
If you have other questions, contact me at http://www.cgdev.net