Jump to content
  • Advertisement

Archived

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

pearsoe

3D Models in World Space

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

Is there a way to determine the coordinates of a specific point of a 3D model in world space. For example, you have a turret on a 3D model of a ship that you want to emit a laser from, or you have a landing pad (a plane) you want to perform bounds checking on. How can you do this? Any help appreciated. Thanks, Eric

Share this post


Link to post
Share on other sites
Advertisement
It would seem to me that if you are drawing the object, you would already know where it is...

Share this post


Link to post
Share on other sites
I know one 3D coordinate of where the entire model is being rendered around. I don''t know the coordinates of specific points that compose the model when it is rendered.

Thanks,
Eric

Share this post


Link to post
Share on other sites
Basically if you are using an indexed list to draw your mesh you have a vertex buffer and index buffer.
The main question is which vertex do you want to know the coords for? That is something you will have to figure out either by scrolling through the x file or whatever you are using to read your mesh in or perhaps making the laser or whatever its own object so you have something small to work with and figuring out from there a point on the end of the object
You could even make a seperate object that you dont draw...anyways the key is figuring out a specific vertex and then returning the coords for that vertex and modify for any world transforms you have done to it..
hope this helps not sure how clear i was....

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!