This site requires JavaScript, please enable it in your browser!
Greenfoot back
BrownDwarf
BrownDwarf wrote ...

2017/1/15

Collision Detection

BrownDwarf BrownDwarf

2017/1/15

#
I am making a game currently, but I need to add code so that if my player collides with a platform, it doesn't go through it (the platform acts like a solid). I have tried using the getoneobjectatoffset code, and if there Is a platform I set the speed to zero, but this isn't working for me. I think part of the reason is that if there are two or more platforms detected it bugs out. Using the getobjectsatoffset doesn't work however, because there is no way to tell the hero to look for a specific platform. Is there? Any suggestions. THANKS
danpost danpost

2017/1/15

#
There are countless discussions on this issue. You can search for them by entering key words in the search field above ("platform collision" might get you somewhere).
You need to login to post a reply.