Jump to content

SetTerrainHeight


SpiderPig
 Share

Recommended Posts

SetTerrainHeight

C: void SetTerrainHeight( TEntity terrain, long x, long y, flt height )

C++: void Terrain::SetHeight( int x, int y, flt height )

BlitzMax: SetTerrainHeight( terrain:TTerrain, x, y, height# )

Pascal: procedure SetTerrainHeight ( terrain:THandle; x:Integer; y:Integer; height:Single );

Sets the terrain height at the specified grid point. Height should be a number between 0 and 1.

 

How is a height between 0 and 1 of any use? Are all vertex heights in a terrain decimals are they?

Link to comment
Share on other sites

Internally, it's a word value (2 bytes). The real height is the terrain scale y component times the internal value, divided by 2^16. The GPU has a setting to treat the word as a 16-bit float.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...