Terrain help

Blitz3D Forums/Blitz3D Programming/Terrain help

Baystep Productions(Posted 2004) [#1]
I need help finding the aprox. Y value of a point in the terrain. If thats how you would say it. So, say I want to put a point on say every square in a terrains grid. X is easy, and so is Z. But I can't find a fast in game way to get the Y. I've tried TerrainHeight, but that doesn;t help me at all. Is there some kind of scaling I'm missing? Any Ideas? or am I just talking non-sense. I am frying over this please help.


GfK(Posted 2004) [#2]
TerrainHeight returns a float between 0 and 1. A terrain is 1 unit high by default.

So if you've scaled the terrain, 'Y# = (TerrainHeight(Terrain,X,Z) * ScaleFactor) + EntityY(Terrain)' will give you the global Y position.


Baystep Productions(Posted 2004) [#3]
Bitchin' ,Oops. I mean very cool. Thx.