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 Discussion / Can you rotate all sliding collision boxes?

Author
Message
BLink
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 17th Jul 2006 22:51
I'm making a rail shooter where the ship continually moves forwards, and I want a way for there to be sliding collision in the game without stopping the ship completely. My idea is...



Like Example B, you'd rotate the collision boxes 45 degrees so that everything slides off to the side. I absolutely must have the ship moving straight down the Z axis, just changing its X and Y positions to aim, it's a key element of both the gameplay and the controls, so I can't just rotate the direction the ship is headed by 45 degrees. Currently, that means my sliding collision effects work like Example A, the ship runs into the collision box and just stops. So, I looked for a way to rotate the collision boxes and still implement sliding( by rotating all effected boxes by 45 degrees) but I've had no luck. So, any suggestions?

Pineapple juice, the best drink ever made.
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 17th Jul 2006 23:27 Edited at: 17th Jul 2006 23:28
Download Sparky's Collision dll, or get NGC, or look into Kensupens/G-Man's collision routine. Plenty of methods out their, using box collision isnt one of them (when dealing with polygonal, non-primitve objects).

However if its a rail shooter, and the only change in position is on the x and z axis, you could just check if the object goes to far to the left, if so move it right, if too far to the right, move it left.


Projects: Online CTF Game | Newcommer's Guide to FPS's
BLink
21
Years of Service
User Offline
Joined: 1st Jan 2004
Location: Laptop, wherever that is
Posted: 18th Jul 2006 01:57 Edited at: 18th Jul 2006 01:59
Ah, but this is to apply for obstacles on the rail, not to keep the object within the rail area itself. Can you give me a link to some of these though? I don't have the slightest idea where to look.

EDIT: Ahaha, didn't realize that was the topic below this one >_>

Pineapple juice, the best drink ever made.

Login to post a reply

Server time is: 2025-05-25 08:32:46
Your offset time is: 2025-05-25 08:32:46