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 / New Idea for Ramps/Stairs/Inclined Plains -- Need some help

Author
Message
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 21st Mar 2005 05:52
A lot of people have problems with ramps including myself. I used to simply use a process of moving the user up 10 units every time they came in contact with the ramp, which is like this idea, except this simplifies it a lot more for use with all objects. Here it is:

Code Test Setup:
- Have 3 or 4 boxes rotated at different angles, 1 or 2 of em should be at perfect angles like 90, 180, 270 or 360.
- Have a character that can move around , could be a simple box

The idea:
- Use a collision check to check when the user collides with any object.
- If the object's X angle is 90, 180, 270 or 360, relocate the user to their old coordinates.
- If the object's angle is anywhere between 0-89, 91-179,181-269,or 271-359, move the object up 10 (or whatever amount you want) units.

Thus, this is a fully functional collision detection method. Ofcourse it wouldn't work for floors because floors are at perfect angles so you wouldnt move.

Anyways its just an idea but I cant get it working, I dont know how to check if the objects angle is equal to the amounts without having to check for EVERY single object. I tried using 0 as an object number but it said invalid object number.

Well, it's in whoever wants to bother with this's hands.

Causin' RUCCUS whereva' I go.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 21st Mar 2005 06:56
Nvm this way is stupid

Causin' RUCCUS whereva' I go.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 21st Mar 2005 07:00
Just give up. As soon as you start introducing ramps and rotated boxes, then DBPro's collision just isn't cut out for the job.

If you can afford it, get NuclearGlory's collision DLL and save yourself lots of work.

http://www.nuclearglory.com

Boo!
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 21st Mar 2005 08:21
Or save the money and get Sparky's collision system !
dre
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: West Side
Posted: 26th Mar 2005 14:55
Or maybe get walaber's Newton Physics Wrapper, which is free also.

im not tall, youre just short
Hop a long
20
Years of Service
User Offline
Joined: 12th May 2004
Location: The Code Dump
Posted: 27th Mar 2005 11:03
Ruccus

Emperor Baal's Math Collision Tutorial has info on coding for ramps.
http://www.nuclearpublishing.com/hosting/emperorbaal/tutorials/Math/MathColl.htm

Here's an example of it in use.
http://www.geocities.com/hifin2003/incline.html

Login to post a reply

Server time is: 2024-09-23 15:39:24
Your offset time is: 2024-09-23 15:39:24