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 / collisions

Author
Message
UnD34dNighTM4r3 Productions
8
Years of Service
User Offline
Joined: 24th May 2011
Location:
Posted: 25th May 2011 00:18
Does any one know how to do the
"if object collision(....)
position object new1#px
end if
is that right or is it something else???
TheComet
11
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 25th May 2011 18:26 Edited at: 25th May 2011 18:27
OMG how do you remeber your name when you have to log it?

Anway, here's the correct way to use it:

You will have to set up the objects you want to check with collision boxes first. Here's how you do it:





If you want to check collision with every other object, you just change the OtherObj to 0:



Currently, your player will be able to climb up walls if you jump on the side of them (if you're using gravity), to fix this, you will have to check if they are colliding on the Y axis:



Hope that fixes your problem

TheComet

Login to post a reply

Server time is: 2019-08-24 05:49:16
Your offset time is: 2019-08-24 05:49:16