#### Archived

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

# Height of a ROAM landscape at X,Y

This topic is 6222 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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 on other sites
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.

1. 1
2. 2
Rutin
19
3. 3
JoeJ
16
4. 4
5. 5

• 36
• 23
• 13
• 13
• 17
• ### Forum Statistics

• Total Topics
631703
• Total Posts
3001814
×