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 / DB1 & Pro: Ultra fast sliding collision between Player/Rotated Objects

Author
Message
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 26th Nov 2002 18:50
It would be great if someone clever could update this for all 3 dimensions:

haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Nov 2002 19:46
That is some great code! Though if you hit the planes directly on the ends you get stuck in side them.

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 26th Nov 2002 20:02
Though if you hit the planes directly on the ends you get stuck in side them.

Maybe that's only with plains, not cubes etc?

I love Star Trek.
Especially the Episodes with Starships in.
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 26th Nov 2002 20:24
Yeah, I've found it works REALLY great if you restrict the collision to one side only (ie the result of the Dot Product is 0 to 1 OR -1 to 0) and ignore the other collision, effectively saying "You can collided only with the defined object Normal, not the back of it" as it stops the "Getting your arse stuck in the wall" syndrom.

If anyone's interested I'll do a tutorial on building these plains from a 3ds/x object limbs. Works well for a path or race track.
haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 26th Nov 2002 20:56
have you ever thought about using the 3d math commands in DBpro, it might speed it up even more

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 27th Nov 2002 00:30
"If anyone's interested I'll do a tutorial on building these plains from a 3ds/x object limbs", yes please, sounds cool. Hey, actually a tutorial on the 3dmaths commands (or just some examples) would be sweeeeet.

Cheers
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 28th Nov 2002 05:17
Okies just as soon as time allows (tommorrow?). How about an oval race track? Always good for a laugh...
haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th Nov 2002 22:24
i updated it a bit to take into account three dimensions, i think the collision code is working fine, though my make-shift gravity and floor makes it a little too jumpy, though it is my first attempt at it.



Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 28th Nov 2002 22:45
lol, i cant believe how stupid i was, here is the version of the code which has gravity working, its fun sliding down objects



Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 29th Nov 2002 15:54
Hi there, I haven't tried the latest version (yet, but will do!) but when I tried the original code on my screen was just a spinning cube, no other objects.. perhaps I should re-try with patch 3 (haven't run it again since installing it).. may just be me. I can try again later,

Cheers
haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 29th Nov 2002 17:23
the first version didn't limit the frame rate so i added in sync rate 30 to slow it down

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
Dean
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Canada
Posted: 30th Nov 2002 01:36
thanks!, I was looking for code like this


''Mmmm.. Tastes like Nazca!''
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 6th Dec 2002 09:21
Tutorial added [url]www.actinic.hiway.co.uk[/url]
haggisman
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Dec 2002 11:04
Nice tutorial, but i was more interested in your game

Specs:- 1GHZ athlon, Radeon8500, 192mb ram, winxp
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 17th Dec 2002 03:34
Oh great! After all that effort on the tutorial - lol

I'll upload some new screenies of the game just for you then

Login to post a reply

Server time is: 2024-04-19 21:09:03
Your offset time is: 2024-04-19 21:09:03