3D Models in World Space
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
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
Thanks,
Eric
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....
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....
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement