Jump to content
  • Advertisement

Archived

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

piman

How to move objects in D3D

This topic is 5178 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
Thanks!
I used to do OpenGL a long time ago, now I''m starting to remember the matrix stuff.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!