Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Ground Height Help

Author
Message
Stig Design Stig Magne
20
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 20th Apr 2007 12:08
If i Youse Matedit or Other Level/Matrix Editor
How Can i Get the (Get Ground Height)Code to work

Stig Magne Risnes Berger
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 20th Apr 2007 20:54 Edited at: 20th Apr 2007 20:57
Get Ground Height needs only three pieces of information - the matrix number, the X position and the Z position on the matrix that you want the height of:

Height# = Get Ground Height(MatrixNum,XPos,ZPos)

Height# then equals the height of the matrix at that position - regardless of the method for actually creating the matrix.

Use the X/Z position of the camera or player character object as the XPos and ZPos parameters and simply add the amount required to the returned value to place the camera/object in it's new position:

Position Camera Camera Position X(),Height#+2.0,Camera Position Z()

TDK_Man

Login to post a reply

Server time is: 2026-07-06 09:28:07
Your offset time is: 2026-07-06 09:28:07