Additional exercises – Sharpening the axe
Here are some other exercises you can do in Godot:
- Tweak the movement variables of the player character so it feels like you are ice skating.
- Rewrite the
_physics_process()
function of the player by replacing themove_toward()
function with raw vector operations. You’ll need to add a vector to thevelocity
variable in the direction of theinput_direction
that has the length of theacceleration
variable. You’ll then have to make sure that thevelocity
variable doesn’t exceed themax_speed
variable.