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 Professional Discussion / New Math / MAtrix Ground HEight Question

Author
Message
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 2nd Dec 2003 09:29
OK - I know how Matrix Ground Height Works - its based on tile intersections - but to get the REAL height of the "Ground" anywhere inside a tile - you gots to do some real work.

I am not schooled in these matters but I would think you take the tile's four corners (of the one you are over) and diagonally calc the differences from say the top left corner and the bottom right corner - halve the difference and add that to the lower height of the two.

Do that the other way (top right to bottom left) then take THOSE two results and again find the differences and add them to the lower one.

I there a command that gives you REAL height of matrix based on its position AND the XYZ points in question (not tiles... Actual Calc'd height between matrix points)

-=/Jaze/=-
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Dec 2003 11:51
FLOAT = get ground height(matrixNumber, Xposition, Zposition)

Right in the help file buddy. Aanything else?

Also, by using your described method of averaging the 4 corners of a tile will only give you the height of the center of the tile.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 2nd Dec 2003 14:24
You are confusing get ground height() with get matrix height()


God created the world in 7 days, but we're still waiting for the patch.
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 2nd Dec 2003 21:04
thanx - I'll check out both matrix and ground height = previous tests seemed to "almost work" ya know - like still going through matrix instead of over kinda thing....

And the math would probably find the actual height anywhere because I would get my height differences by calcing the height at the given position in the tile where my diagonal lines would intersect (coord based) which is where the point is question is.


If its written for me already I'll be happy to use it
thanx for everything

(Note: Get Ground Height seemed to be skewed - but it is probably me)

-=/Jaze/=-

Login to post a reply

Server time is: 2026-07-26 20:14:34
Your offset time is: 2026-07-26 20:14:34