From aa93731f047e7c0d949a359cbd034ede63dd3fb4 Mon Sep 17 00:00:00 2001 From: RandomityGuy <31925790+RandomityGuy@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:47:06 +0530 Subject: [PATCH] fix marble bounces --- src/Marble.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Marble.hx b/src/Marble.hx index 480b62f9..6141779d 100644 --- a/src/Marble.hx +++ b/src/Marble.hx @@ -198,6 +198,7 @@ class Marble extends GameObject { var _airAccel:Float = 5; var _maxDotSlide = 0.5; var _minBounceVel:Float = 0.1; + var _minBounceSpeed:Float = 3; var _minTrailVel:Float = 10; var _bounceKineticFriction = 0.2; var minVelocityBounceSoft = 2.5; @@ -838,7 +839,7 @@ class Marble extends GameObject { } function bounceEmitter(speed:Float, normal:Vector) { - if (this.bounceEmitDelay == 0 && this._minBounceVel <= speed) { + if (this.bounceEmitDelay == 0 && this._minBounceSpeed <= speed) { this.level.particleManager.createEmitter(bounceParticleOptions, this.bounceEmitterData, this.getAbsPos().getPosition()); this.bounceEmitDelay = 0.3; }