air friction for vertical velocity
This commit is contained in:
parent
a21246e016
commit
fb375e352b
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue