Page 1 of 1

Help platformer hit detection

Posted: Mon May 14, 2018 10:46 pm
by gfarrarthenoob
So when ever the player hits the top of the platform it will just stop moveing
the code
https://pastebin.com/GFpXjE7a

Re: Help platformer hit detection

Posted: Fri May 25, 2018 9:38 pm
by SPlice
You are only updating your position if your not on a box.
rework this

Code: Select all

if coln(box[i].x-5,box[i].w-5,box[i].y-5,box[i].h-5,new.x,new.y,player.w,player.h) == false then
        player.y = new.y
        player.x = new.x
      end