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.

Newcomers DBPro Corner / Collision Help

Author
Message
Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 27th Sep 2005 03:01
I'm making a game (big suprise) and I need a cube to jump from platform to platform, to the other side of the screen. Tight now I am having slight difficulties with making the cube not fall through the platforms... help anyone?



Am I dead yet?
Louiz ofRohr
19
Years of Service
User Offline
Joined: 11th Nov 2004
Location:
Posted: 27th Sep 2005 03:13 Edited at: 27th Sep 2005 03:17
Quote: "to the other side of the screen."


I can't understand what you mean..
Don't make the thing complicated..
You just wanna jump from a platform to another one..

You can learn a collision dll (for all of the collision types)..
or just look at this:

the object can't pass through the platform..
so the simple concept is:
object's _y can't be lower than platform's _y..

but you need to check if the object is 'inside' the platform's area..


Lets think the object is above the platform so if it falls it's gonna hit the platform..
You also must to check if the object is above the platform's base..
else, when the object cube gets inside the area, but under the platform, it is gonna
be teleported to the top of platform..

I'll not give you the codes...
All the info you need is above..

Make the tests.. it is pure logic..

.edit.
I explained to you the easier way for newcomers.. but you'll soon find it is much better
to create your own collision system or just to learn any collision dll..
.edit.

The worst foe lies within the self..

Login to post a reply

Server time is: 2024-09-24 05:21:30
Your offset time is: 2024-09-24 05:21:30