At the minute I have a simple 2D setup. There is a function called in
_process() to handle inputs. If it detects a jump key, I use
apply_central_impulse() to make the rigidbody move upwards and fall as normal, and this works fine. I want to make it so that pressing right, for example, makes the character move right. The problem is, I don't want to apply a force, because the movement is slow at first as it accelerates. The character should move at a speed when pressed, and not move at all when the key is not held. How do I achieve this? The docs warn against directly changing the velocity of a rigidbody directly.