air friction for vertical velocity

This commit is contained in:
lustlion 2022-02-15 10:55:56 +01:00
parent a21246e016
commit fb375e352b
1 changed files with 3 additions and 0 deletions

View File

@ -163,6 +163,9 @@ function Player:DoPhysics()
else else
self.vel.x = self.vel.x * (1-self.airFriction) self.vel.x = self.vel.x * (1-self.airFriction)
end end
self.vel.y = self.vel.y * (1-self.airFriction)
if math.abs(self.vel.x) < self.zeroSpeed then self.vel.x = 0 end if math.abs(self.vel.x) < self.zeroSpeed then self.vel.x = 0 end
end end