diff options
| author | ne_mene <[email protected]> | 2026-03-12 20:05:13 +0100 |
|---|---|---|
| committer | ne_mene <[email protected]> | 2026-03-12 20:05:13 +0100 |
| commit | 48ca262c88edeb29579fe3c9a38036677e446e71 (patch) | |
| tree | 65b43571837f2554df55b75b57aee25a3ba1ab5f | |
| parent | 80564184d492227d4a403358e0f3ffdef0ff008e (diff) | |
tested touch, fixed
| -rw-r--r-- | src/phys.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
