Jump to content
  • Advertisement

Archived

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

How to move objects in D3D

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

Beginner help: I have an object (cube) created and rendered appropriately. I have its current position in space with x, y, z. I want to update its position to a new location (the cube moved). What is the best way to do this? The cube is made up of the VertexBuffer which has all the coordinates of the vertices, but I don''t know how to access those vertices to change them so that they will be rendered at the new location. Temporarily, I solved this by dropping the old cube and creating a new cube with the new position. Obviously this isn''t the best method as it has to clean up memory so much (every time the cube moves). There''s got to be a simpler way to update the vertices'' positions. Please help! Thanks! BTW, I''m writing in C#.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!