fix swing

This commit is contained in:
lustlion 2022-02-12 11:43:56 +01:00
parent 8ddf3610ac
commit 6566e6fbab
1 changed files with 3 additions and 1 deletions

View File

@ -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