I haven’t really gone into movement mechanics before, so this is a first for me. How would I create a simple diving mechanic that just launches your character forward and stops when you jump or hit the ground? What’s the best way to apply the force to the player’s character? What’s the best way to manage the state of the player’s movement (can or can’t jump, currently diving, etc)? And, finally, what’s the most optimized way to do it?
For example, similar to the diving mechanic in the 2018 Egg Hunt or the diving mechanic in A Hat in Time.