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.

Dark GDK / position objects directly above terrian

Author
Message
Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 17th Aug 2008 14:14
Hi, I Have made a terrian and I want to cover it with object like circles and simple stuff. So far I have the objects in random places over the terrian but they are all floating in the air. Can someone please tell me how to position them directly above the terrian? Thanks
Dark Lord
19
Years of Service
User Offline
Joined: 19th Aug 2005
Location: Australia
Posted: 2nd Sep 2008 10:10 Edited at: 2nd Sep 2008 10:15
when you position an object in DB it positions from the centre - at least i think this is the case - e.g.


you can correct this by changing the last statement to

This same principle of passing half the vertical height into the dbPositionObject() fn, will work for almost all objects. At least I think it does.
Happy coding!
[edit]
wait that didn't answer the question did it
are you using a terrain or a matrix?
for terrain use:

for a matrix use:

x, z are the position variables of the object you wish to place at ground height

Login to post a reply

Server time is: 2024-09-30 05:24:06
Your offset time is: 2024-09-30 05:24:06