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.

Newcomers DBPro Corner / Object Placement

Author
Message
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 21st Aug 2010 00:30 Edited at: 21st Aug 2010 01:22
Hi all,
When I try to place my objects with this code (advanced terrain):


The objects don't sit on the terrain.
Can anyone tell me what I am missing?

Mike

some cool stuff someone else said here
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 21st Aug 2010 01:23
You are changing the co-ords of x and z, with position object but not doing the same for the height line?

http://s6.bitefight.org/c.php?uid=103081
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 21st Aug 2010 01:41
I see what your saying, but isn't it getting that info at the x and z coordinates at that point?

some cool stuff someone else said here
Dia
19
Years of Service
User Offline
Joined: 16th Jan 2005
Location:
Posted: 21st Aug 2010 07:46
Th# = get terrain ground height (1,Object Position x(Obj),Object Position z(Obj))

Position Object obj, x-256,Th#, z-256

you are getting the terrain height at one position, and then positioning the object at a new position 256 units west and 256 units south of the original position, using the original position y-height.

This is not the Sig you are looking for....
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 21st Aug 2010 16:15
No, as Dia says you are getting your height co-ords at the 0,0 axis of the object for example, and then positioning the same object 256 opixels away on each axis. Adding 256 to the co=ords means you are not checking the same spot. You need to remove the 256 or add it into the get terrain height command.

http://s6.bitefight.org/c.php?uid=103081
mikewhl
14
Years of Service
User Offline
Joined: 19th Jul 2010
Location: Columbus,Ohio
Posted: 21st Aug 2010 17:00
I wanted to have the center of my map be at 0,0 (for no real reason).
I went in and changed things to position terrain at 0,0; removed the "-256" and tried that. I worked much better, but still had more than a few objects floating or buried. After much mucking around with things, this seems to give the best results.

Th# = get terrain ground height (1,x,z)

Always remember the KISS method !

Mike

some cool stuff someone else said here

Login to post a reply

Server time is: 2024-11-24 12:04:05
Your offset time is: 2024-11-24 12:04:05