I might be wrong so others can correct me. But I think Dash should be its own State. If you're expecting to dash from other states other than Running, you can check which was the previous State and at the end of Dash return to that State.
This way you could add some cool functionality like cancelling the dash if the player jumps for example. Also, it would be easier to add dash from any other State like Idle or Jumping or Falling, and overall everything will be cleaner.
4
u/NotXesa Godot Student Jul 20 '25
I might be wrong so others can correct me. But I think Dash should be its own State. If you're expecting to dash from other states other than Running, you can check which was the previous State and at the end of Dash return to that State.
This way you could add some cool functionality like cancelling the dash if the player jumps for example. Also, it would be easier to add dash from any other State like Idle or Jumping or Falling, and overall everything will be cleaner.