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 / Time to fix up my collision

Author
Message
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Aug 2005 01:49
alright, here's the deal, i have sparky's collision DLL, and i have some problems, basically I want to know if anyone knows how to fix them, Ill also show some stuff that I think might be causing the problems..

Problems:
When I jump, I can go right through a roof (unless it's slanted)
When I go down a slope, the player seems to bounce around, as if the slope is actually stairs
When I go down a slope, I sink into it slightly
When I jump onto a platform from really high I sometimes fall right through it

Stuff That I think might be causing the problems:
The jumping through the roof one: I discovered that if I just added something like 25 to the players position e.g. y#=y#+25, it would jump.

Falling through the platform:
Seems like it only happens if I jump onto it from high up..

I apprecialy ANY help


NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 17th Aug 2005 03:35 Edited at: 17th Aug 2005 03:38
Zotoaster,

I figured you were smarter than to not show us your code, that we may better help you.

However, about falling through the platform, is a problem with the speed of the fall. If the object falling is increasing its velocity each loop, then when it comes to before the area of collision, then on the next loop, its position may surpass the area of collision. A little semi-accurate raycasting can fix this problem.


+NanoBrain+
Zotoaster
20
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Aug 2005 22:00
haha, sorry i didn't post any code, but thats because i don't know which part of the code has the problems.. and theres soooo much code.

you might be right about the raycasting thing, do you know how to do it? I don't have a clue because I've never tried thanks


Login to post a reply

Server time is: 2025-05-22 17:23:11
Your offset time is: 2025-05-22 17:23:11