@@ -149,7 +149,7 @@ public partial class PlayerPhysicsController : CharacterBody2D {
|
||||
vely *= 1/4f;
|
||||
}
|
||||
|
||||
if (Input.IsActionJustPressed("turn_back") && vely > 0) {
|
||||
if (Input.IsActionJustPressed("turn_back") && vely > 0 && velx != 0) {
|
||||
var side = velx > 0 ? PredictiveCollisions.Location.BottomRight : PredictiveCollisions.Location.BottomLeft;
|
||||
if (Predictor.AnyHit(side) && !this.IsOnWall()) {
|
||||
EmitSignal(SignalName.OnTurnbackJump, true, this.IsOnWall());
|
||||
|
||||
Reference in New Issue
Block a user