Archived

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

move an object

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

who can i move a mesh across mi world? i can move the camera, rotate and translate my world, but i don''t know move a mesh. What''s the function? Thanks.

Share this post


Link to post
Share on other sites
Where to begin...

Each "object" of yours probably has an associated location in world space, ie and x, y, and z, coordinate. You translate each object mesh by these coordinates when you render then so that they appear in the proper scene location. So to move your objects you just adjust the x, y, z coordinates of your object. However, it is a bit more complicated because depending on how your object is oriented, concepts like "forward" and "up" are relative. Try the GameDev search function for help.

Share this post


Link to post
Share on other sites
Assign a different world matrix to every mesh you need, then just set each matrix before you render that particular object...

Share this post


Link to post
Share on other sites
I read the post of hammer_bg_, but i don't understand anything. I'm just a program in visual basic, and i can't use the examples of those post. If anybody knows those examples in VB, please write it.

[edited by - javincin on June 10, 2004 11:54:25 AM]

Share this post


Link to post
Share on other sites
I use VB... Anyway, create a new matrix for your 3D mesh/object. When the mesh needs to be transformed, transform theat matrix. Right before rendering the object set the matrix using (in DX9):

D3DDevice.SetTransform(TransformType.World, matObject)

where D3DDevice is your devbice, and matObject is the matrix for the object.

Share this post


Link to post
Share on other sites
Ok, i''m going understanding. When I had only an object and a worldMatrix, that runs ok, but now i have 2 object and 2 worldmatrix. Who i assing the objects to the matrices??? Thanks.

Share this post


Link to post
Share on other sites