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 / terrain boundaries

Author
Message
xix psycho xix
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 17th Sep 2008 01:04
i was wondering if anyone could tell me how to go about setting up boundaries for a terrain. I have a 512x512 bitmap that I am loading as a terrain, and i am scaling it and setting boundaries using an object like so:



and then I am checking for collisions with this object, at which point an object will be either prevented from going any further or the object will turn. Am I doing this right?
AlexI
19
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 17th Sep 2008 02:45
You could just make sure that the object doesnt go past a certain distance e.g


xix psycho xix
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 17th Sep 2008 03:05
how could i do that for terrains that i dont know the size of? Say that i would use dbLoadTerrain to load one of three, all of which were different sizes, and i wanted to make sure that the object stayed within the bounds of all of them.
xix psycho xix
16
Years of Service
User Offline
Joined: 15th Sep 2008
Location:
Posted: 17th Sep 2008 06:05
Is there anything that I can do to make that flexible? What if i want to load different heightmaps of different sizes? Say i want to load one that is 512x512 and another 256x256, but i scale them both like so: dbScaleTerrain (TERRAIN, 100.0, 6.0, 100.0)

Now, these objects will have different edges, so how can i make that in my code? Use something like dbGetTerrainXSize (TERRAIN)?

Login to post a reply

Server time is: 2024-09-30 05:41:38
Your offset time is: 2024-09-30 05:41:38