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 / Collide with Terrains?

Author
Message
Yart
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: Turkey Sandwich
Posted: 28th Jul 2004 11:24
How can I make either a camera or object collide into a terrain?

Pie!
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 28th Jul 2004 12:50
If you mean detect collision, you'll want to use the "get ground Height" command.

Basically, you'll do something like this.





A book? I hate book. Book is stupid.
(Formerly known as Yellow)
Carlitos
21
Years of Service
User Offline
Joined: 8th Jul 2003
Location: United States
Posted: 28th Jul 2004 14:18


note: Please dont mind the caps, its just the way I type my code, I mean nothing by it

Here, ID is the object number. If your working with many objects, you could make this into a function, so that you won't need to keep typing it out. To have the code work for the camera, use this...




Yart
20
Years of Service
User Offline
Joined: 23rd Jun 2004
Location: Turkey Sandwich
Posted: 28th Jul 2004 15:09
thanks alot guys! really helps!

Pie!
Hop a long
20
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 29th Jul 2004 11:58
Here you can see a short demo of movement over a matrix:
http://www.geocities.com/hifin2003/matrix_jump.html

Login to post a reply

Server time is: 2024-11-27 03:34:42
Your offset time is: 2024-11-27 03:34:42