Terrain Selection

Im trying to do something similar to MonkeyWorld ( nice work btw ) whereby a selector highlights a given area on a TerrainPage. The only difference is that i need to do it with a disk or square and not a circle.

Similar to alot of build em up strategy game, whereby to place a building it highlights in green where it can be placed and in red where it cant.

I have got so far by ray tracing the bottom vertices of the selectors bounding volume looking for intersects on the page, this gives my the x and z coordinates, i can look the height up on the terrain page.

So i have all the vertices ( normals on the terrain page ), just dont know what to do with them


The ray trace actually gives me the triangle using the intersects where method on the ray.

Ok - so - i have a whole bunch of triangles - what would the best way be to store these, set texture and colour them ??.

ok - have done a workaround - creates a load of dots at the position of the TerrainPage Normals

rather hacky but first a ray is fired to detect the position of teh selector

the the bounding volumes points are iterated through and a ray passed down to detect wether the selectors shape is at that position - if so it adds a line at that point and on the height of the heightmap.

??? havent a scooby how shadowing works - but kinda imagine it may be similar