SpiderPig Posted May 6, 2011 Share Posted May 6, 2011 SetTerrainHeightC: 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? Quote Link to comment Share on other sites More sharing options...
Canardia Posted May 6, 2011 Share Posted May 6, 2011 I think it's internally a byte with values 0-255, but that would be difficult to use, so 0.0-1.0 is better. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
SpiderPig Posted May 6, 2011 Author Share Posted May 6, 2011 Ah I see. Thanks for the heads up Lumooja. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 8, 2011 Share Posted May 8, 2011 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. Quote 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 More sharing options...
Recommended Posts
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.