From 6566e6fbab79b711e2318bc55e83a2cce021eb09 Mon Sep 17 00:00:00 2001 From: lustlion Date: Sat, 12 Feb 2022 11:43:56 +0100 Subject: [PATCH] fix swing --- code/entities/player.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/entities/player.lua b/code/entities/player.lua index b59e758..3bd5340 100644 --- a/code/entities/player.lua +++ b/code/entities/player.lua @@ -30,7 +30,7 @@ o.dashAmount = 10 -- int -- hook values - o.hookDistance = 100 + o.hookDistance = 80 o.hookedDistance = 80 o.hookAnchor = { x = nil, @@ -199,6 +199,8 @@ function Player:DoPhysics() local pos_y = self.hookAnchor.y + self.hookedDistance * math.sin(-math.rad(180)+hook_angle) self.vel.x = self.vel.x + pos_x - self.pos.x self.vel.y = self.vel.y + pos_y - self.pos.y + self.pos.x = pos_x + self.pos.y = pos_y end end