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.

DarkBASIC Professional Discussion / Sliding Rotated Collision Boxes

Author
Message
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 25th Nov 2002 18:33
I wish that the get collision commands would return sliding data from rotated boxes, and not just from non-rotated. Its pretty annoying Or is it just hard to implement ?
Lampton Worm
21
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 25th Nov 2002 18:35
..I may be having a moment of madness (coffeee coffeeeeeeee cooffffffeeeeeeeeeeeeeeeeeeeeeee).. can we do rotated sliding box collision between 2 rotating objects easily in DBP ? I need to get some sleep. This is what you get for going on the wagon for 1 whole week..
DrakeX
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 25th Nov 2002 23:23
NO

quite simply.

so i suggested it in the "what do you want to see in DBP" thread.

i wish it worked too

i'm looking at yooooou!
SonicBoom
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 26th Nov 2002 10:21
Hey, YES you can

It just neds some work

My math is poor and I cobbled this together from online Trig help so forgive my comments. If someone would like to refine this please feel free. It works for yRotated plains/objects, perfect sliding collision. Basically you take advantage of the fact that the plain is infinately flat, so you can only hit 2 sides of it. Then you use the Object's stored YRotated angle to work out the sliding collision data based on the vector of your player when he hits it. It only REALLY works if you restrict the collision to ONE side only, otherwise you can get your arse stuck in it when you turn on the spot.

I have a loader somewhere that creates these objects from (specially created) Limbs of a 3ds/x object and have used it successfully a winding race track. I'll do a tutorial if anyones interested

It would be great if someone clever could take this and update it for full 3d collisions (for hills and everthing!)

Login to post a reply

Server time is: 2024-05-07 16:21:14
Your offset time is: 2024-05-07 16:21:14