a better symbol

This commit is contained in:
Josh Deprez 2021-08-12 16:24:59 +10:00
parent ad86535ca1
commit d172bb9f6a

View file

@ -32,7 +32,7 @@ func (aw *Awakeman) Update() error {
ε = 0.2 ε = 0.2
restitution = -0.3 restitution = -0.3
gravity = 0.3 gravity = 0.3
airResistance = -0.01 // terminal velocity = 30 airResistance = -0.01 // terminal velocity = 30
jumpVelocity = -4 jumpVelocity = -4
runVelocity = 1.4 runVelocity = 1.4
coyoteTime = 5 coyoteTime = 5
@ -56,7 +56,7 @@ func (aw *Awakeman) Update() error {
aw.vy = 0 aw.vy = 0
aw.coyoteTimer = coyoteTime aw.coyoteTimer = coyoteTime
} else { } else {
// Falling. v = v_0 + a, and a = gravity + airResistance(v) // Falling. v = v_0 + a, and a = gravity + airResistance(v_0)
aw.vy += gravity + airResistance*aw.vy aw.vy += gravity + airResistance*aw.vy
if aw.coyoteTimer > 0 { if aw.coyoteTimer > 0 {
aw.coyoteTimer-- aw.coyoteTimer--