Archived

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

malachii

Height of a ROAM landscape at X,Y

Recommended Posts

malachii    122
In order to compute the collision between my ROAM based landscape and an projectile P, I need to calculate the height of the landscape at X,Y (X,Z to be precise). How would you recommend doing this? The easy way is to use the underlying height map, but that may not look good. The tesselation process may aproximate the landscape in such a way that a crevise is hidden. If the bomb lands in the crevice, it will appear to go through the landscape prior to exploding. This is the quickest way to get the answer as well CPU-wise. The other way (I believe, please correct me) is to tesselate the landscape PRIOR to computing any other game objects (eg: the bomb). Then when I require the height of the landscape at point X, I can traverse the tessellation (the binary tree), performing intersection tests between triangles and the point at every level, until I reach a leaf. Then I perform a final intersection, and that point should be the true, VISUAL intersection between the bomb and the landscape. 1. Is this the best way to do it? 2. My goodness, won''t this be overly expensive to calcuate. Perhaps not, since each game object must only calculate it once per frame to test for collisions. Thanks, Mal.

Share this post


Link to post
Share on other sites
ludemann8    122
I think it is necessary to use the underlying height map, otherwise diferent results will be recieved for differing camera positions. This would be a problem with any sort of networking, or replaying.

You need to do a way which gives consistent results.

Share this post


Link to post
Share on other sites