Jump to content
Sign in to follow this  
Blanco

Get the "real" height position

Recommended Posts

I setpos a unit 7 m above sea level(in a tower)  with:

dude setpos [getpos dude select 0,getpos dude select 1,7]

No problems so far...

Then have a script, with in the beginning som vars with x-y-z coords of the pos of that unit

_xpos = getpos dude select 0

_ypos = getpos dude select 1

_zpos = getpos dude select 2

...later in the script I setpos him again to that startpos ( remember... 7m above sea level)

dude setpos [_xpos,_ypos,_zpos]

Result :  He's setposted on the ground instead of 7m high.

Also when I debug with a hint :

Hint format ["%1",getpos dude]

it returns something like : [21002.54,54333,4,0.0001455]

wtf, he's 7 meters above sea level and it returns 0.0001455 meters? crazy_o.gif

Share this post


Link to post
Share on other sites

it returns something like : [21002.54,54333,4,0.0001455]

height is 0.0001455,  i.e. 0. OFP occasionally is too accurate about the position of objects. that is 0.

The OFPR engine tends to return the height of building top as 0. it's game engine thing.

also, please reduce size of your sig. forum limit is 150 pixels. please read forum rules.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×