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 / Models traversing terrain

Author
Message
hellaeon
16
Years of Service
User Offline
Joined: 16th Jun 2008
Location:
Posted: 16th Jun 2008 12:27
I have looked through the manual and the forum but cant find how I can accurately portray a model such as a tank on terrain taking into account the slope at where the tank sits.

I can get the height of the terrain and put the model at that point, but from there how can I get the tank to sit on the terrain realistically? Is there a function?

I am unsure how to get the rotation angle or the maths neededx to get the correct angle. Bear in mind I randomly position the tank anywhere on the terrain to start with.

See screen shot for my dilema!

[img]null[/img]

Attachments

Login to view attachments
hellaeon
16
Years of Service
User Offline
Joined: 16th Jun 2008
Location:
Posted: 16th Jun 2008 15:11
From What I can gather I use Sparky's DLL.

I am using Dark GDK and have no idea where to find level x to see the sliding example properly but can get it to run. Im guessing there are no other tutorials out there? Can anyone post some code to show a simple terrain (same as DarkGDK tutorials terrain) with a model allowing for what I need? (Realistic position angles, slope, rotation on terrain)

Cheers
NCL
16
Years of Service
User Offline
Joined: 19th Mar 2008
Location: Cornwall Great Britain
Posted: 7th Sep 2008 14:26
How annoying! Sorry to post in such an old thread but I'm having the exact same problem. There doesn't seem to be a lot of help around for this thing. I've tried to do my own code for this, and it seems totally logical but it's kind of faulty for some reason. Here is the code I used. It won't apply to your game obviously but you can change it and use it. It works out the 'tilt' for more than one car though:



This is all I've got so I need some more help on the subject.

Noah

Login to post a reply

Server time is: 2024-11-20 13:43:45
Your offset time is: 2024-11-20 13:43:45