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 / Does anyone know the code snipet for get ground height on an object

Author
Message
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 15th Jun 2003 19:00
Does anyone know the code snipet for get ground height on an object.

y=get ground height (1,?????,????)
how do you know what the matrix co-ordinate is
Info Q.&statments corect@da time of going to pres. I acept 0 responsibility for typos gramaticaly incorect txt swering or pety complant tht u hve so just piss off unles u r anserin da Q.
Codger
23
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Jun 2003 19:37
If you need to know the ground clearance try

function GroundHeight( OBJ)
Height = ( object position y (obj)) - (object size y (obj)/2)
EndFunction Height

Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 15th Jun 2003 19:44
thanks but not what i was looking for unfortunatly. [img][/img]

Info Q.&statments corect@da time of going to pres. I acept 0 responsibility for typos gramaticaly incorect txt swering or pety complant tht u hve so just piss off unles u r anserin da Q.
Codger
23
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 15th Jun 2003 20:21
How about

Return Float=GET GROUND HEIGHT(Matrix Number, X, Z)

Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 15th Jun 2003 20:35
...

You are seriously having a laugh right?

Perhaps i havn't phrased my question very well

I have an object on a matrix you want to keep it on the matrix

mx#={What do i right here}
mz#={What do i right here}
x#=object position x(1)
y#=get ground height (1,mx#,mz#)
z#=object position z(1)
position object x#,y#,z#

OK
this should be simple
who here knows what has to replace "{What do i right here}"

Info Q.&statments corect@da time of going to pres. I acept 0 responsibility for typos gramaticaly incorect txt swering or pety complant tht u hve so just piss off unles u r anserin da Q.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Jun 2003 20:41
Try something like this:

Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 15th Jun 2003 20:59
nope
tried it
it doesnt work



I have a matrix (1)
i have an object (1)

tiles have raised an lowered

do
set cursor 0,0
print "",x#
print "",y#
print "",z#
move object 1,-1.5
mx#=0-matrix position x(1)+object position x(1)
my#=0-matrix position z(1)+object position z(1)
position object 1, object position x(1), get ground height(1, mx#, my#), object position z(1)

loop

and that doesnt work

Info Q.&statments corect@da time of going to pres. I acept 0 responsibility for typos gramaticaly incorect txt swering or pety complant tht u hve so just piss off unles u r anserin da Q.
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 15th Jun 2003 23:02
mx#=object position x(objectnum)
mz#=object position z(objectnum)
my#=get ground height(matrixnum,mx#,mz#)
position object objectnum,mx#,my#,mz#
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 16th Jun 2003 00:13
OK

i found out what the bug was or bugs were

most of those dont work exept for ianM's

Thanks again everyone
big thanks to ianm for solving 3 of my problems ina row [img] [/img]

Info Q.&statments corect@da time of going to pres. I acept 0 responsibility for typos gramaticaly incorect txt swering or pety complant tht u hve so just piss off unles u r anserin da Q.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Jun 2003 00:14
I *knew* it couldn't be me
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 16th Jun 2003 00:49
hehehe

Info Q.&statments corect@da time of going to pres. I acept 0 responsibility for typos gramaticaly incorect txt swering or pety complant tht u hve so just piss off unles u r anserin da Q.

Login to post a reply

Server time is: 2026-07-11 14:55:01
Your offset time is: 2026-07-11 14:55:01