Godot Version
4.2.1
Question
I want to make a value (speed) to stop increasing or decreasing when it gets to a specific value (max_speed). I’m currently using this:
`speed += acceleration * direction * delta
if speed > max_speed:
speed = max_speed
if speed < -max_speed:
speed = -max_speed`
But I’m not sure if it’s ok or if there’s a way to simplify it. Thanks!