if (this.app.keyboard.isPressed(pc.KEY_SHIFT) && this.app.keyboard.isPressed(pc.KEY_D)) {
this.entity.sprite.play(“run”);
this.entity.rigidbody.applyForce(movementSpeed * 2, 0, 0);
this.entity.sprite.flipX = false;
}
I’m experiencing an issue where pressing the ‘Shift’ and ‘D’ hotkeys only triggers a single frame of the animated sprite. Ideally, I’d like this key combination to initiate the full run animation.