From 48ca262c88edeb29579fe3c9a38036677e446e71 Mon Sep 17 00:00:00 2001 From: ne_mene Date: Thu, 12 Mar 2026 20:05:13 +0100 Subject: tested touch, fixed --- src/phys.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/phys.lua b/src/phys.lua index 126b5a8..d35f612 100644 --- a/src/phys.lua +++ b/src/phys.lua @@ -89,7 +89,7 @@ function phys.Box:touching_vertical() end function phys.Box:touching() - return self.touchx ~= 0 and self.touchy ~= 0 + return self.touchx ~= 0 or self.touchy ~= 0 end function phys.Box:get_rect() @@ -148,7 +148,7 @@ function phys.Box:update(velx, vely, dt) before = self.y self.y = self.y + vely * dt * p if collision_check(self) then - self.touchy = velx > 0 and 1 or -1 + self.touchy = vely > 0 and 1 or -1 vely = 0 self.y = before end -- cgit v1.3-2-g0d8e