+ 1
Collision Detection
I'm working on a project and I make collision detection right now. It works. It can check for rectangles overlapping each other but I don't know what to do when player collide a wall. any idea? I want him just to stop walking to walls directions
2 ответов
+ 1
if(player.xpos > screen.width - player.width){
player.xpos = screen.width - player.width
}
0
https://github.com/borislavvv00
Check my github acount to see how i do it.