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 / Collision Code: Can someone help me with this?

Author
Message
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 29th Mar 2003 00:06 Edited at: 29th Mar 2003 00:08
Ok... Cube based sliding collision should be the EASIEST thing to do in DB/P but I can't figure it out. The code just doesn't want to co-operate, I must be doing SOMETHING wrong!



The thing is, the collision only works on the y... I can walk around on TOP of the objects pretty well, but I can walk through them from the side, and from the bottom.

Here's how it works:

The objects I am testing collision with are all 50x50x50
The charactor is a 50x50x50 model

Ok, the obvious way would be to test each corner of the charactor, but
to cut down on calculations, I have incorperated a cheap but effective trick.
I set the bounding box for the cubes to 74x74x74, instead of 50x50x50. This takes into account the player charactor's bulk WITHOUT the added calculations.
Now to test collision on the level, I only have to plug in one point get it?

But the output is all wrong, I can't figure out how to fix it. Any takers?

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors
rapscaLLion
23
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 29th Mar 2003 01:10
No one eh?

Alex Wanuch
aka rapscaLLion
Kousen Dev Progress >> Currently Working On Editors

Login to post a reply

Server time is: 2026-07-11 14:36:26
Your offset time is: 2026-07-11 14:36:26