We currently have movement in X axis and Z axis moves stadily with a set acceleration as the game progresses.
Let's add SOME control in the Z axis as well, allowing the player to slow down a bit when pressing S / DownArrow or speed up when pressing W / UpArrow.
Overview of what's needed to do that:
-Variables exposed in inspector to set the % of speed in Y when pressing W, and when pressing S. (We only want the ship to slow down by let's say 20% when pressing S, and increase by 30% when pressing W.
-Add input logic to ShipController. (bools in ShipControllerInput struct, and set them in GetInput() )
-Each frame, if the appropriate button(s) are pressed, lerp speed to appropriate values, or to default value if nothing is pressed.
We currently have movement in X axis and Z axis moves stadily with a set acceleration as the game progresses.
Let's add SOME control in the Z axis as well, allowing the player to slow down a bit when pressing
S / DownArrow
or speed up when pressingW / UpArrow
.Overview of what's needed to do that: -Variables exposed in inspector to set the % of speed in Y when pressing W, and when pressing S. (We only want the ship to slow down by let's say 20% when pressing S, and increase by 30% when pressing W. -Add input logic to ShipController. (bools in ShipControllerInput struct, and set them in GetInput() ) -Each frame, if the appropriate button(s) are pressed, lerp speed to appropriate values, or to default value if nothing is pressed.