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.

Code Snippets / Sliding Collision MATH

Author
Message
Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 1st Feb 2004 18:36
Here we go again, this is a little code snippet that will introduce fast and easy sliding collision. Using math (if player x = wall x,etc) the sphere (player) is placed at the correct spot. It wont jitter,lag in corners.

It only works with 0,90,180,270 rotated walls (yrotated)




Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
spygamer
20
Years of Service
User Offline
Joined: 17th Oct 2003
Location:
Posted: 1st Feb 2004 19:01 Edited at: 1st Feb 2004 19:02
Great... can I use it in my tutorial?

like this:


" This is a Great code my Emperal Baal"

I make sure I give you full credit!

Thank-You!

I trying to be a moderator. I'm nice and cool 24/7.
Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 1st Feb 2004 21:14
Sure, its free isnt it


Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 2nd Feb 2004 00:14
This code uses a position check. If walls are 0/90/180/270 yrotated this is possible. With different angles you would need way more complicated math. Im working on it.

You can use this in a 3D world, you place the buildings 0/90/180/270 yrotated, the player wouldnt notice it and the collision will work


Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 3rd Feb 2004 08:43
is this the system you're using for Velocity X-Treme?

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia Ti4200 AGP 8x 128MB
Emperor Baal
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 3rd Feb 2004 15:35
sort of, but velocity x-treme uses a cos/sin position check. Im not going to show you the code, because its more than 100 lines


Quote: "
Amd 2500+ | 1024mb pc2700 | A7N8X-X | Geforce4 ti 4200 128mb
"
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 4th Feb 2004 02:55
Ya if its just 0 - 90 (180 and 270 are just the same on a cube ) then your in trouble if your going for circles

NJ tho


We need help! Email us! join@eternaldestinyonline.com

Login to post a reply

Server time is: 2024-04-28 01:36:04
Your offset time is: 2024-04-28 01:36:04