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 on terrain

Author
Message
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 13th Feb 2009 17:02
ive been doing the tutorial "Just Purchased DB? Want to make an rpg?"
ive made the simple menu but ran into trouble when trying to make advanced terrain work with it.

i want the cube to go over the advanced terrain but it just goes through it...

this is the code


it won't even let me run it

attached is a pictur of what it looks like now.
Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 14th Feb 2009 01:13
srry the pic didn't work...
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 14th Feb 2009 02:13 Edited at: 14th Feb 2009 02:14
Line 9 is probably the problem. You only need to load an image once, and then it stays in the VRAM until your program ends. Try moving that line to before the DO.

Also, to avoid confusion, this isn't really advanced terrain - it's technically a matrix. Advanced terrain uses a heightmap to actually make an object of the terrain.

So on line 72, you really should be using:

h#=get ground height(1,x#,z#)

Hope that helps.

Dark Master Ev
15
Years of Service
User Offline
Joined: 18th Nov 2008
Location: That is a very good question...
Posted: 14th Feb 2009 16:12
thanks for that.

Login to post a reply

Server time is: 2024-09-28 02:27:19
Your offset time is: 2024-09-28 02:27:19