Help, moving sooo slow

Hello, I am following this tut but when I start to move the player, it moves EXTREMLY slow and it doesnt really move unless I up the value to like this… (see below) can you help? Thanks

extends RigidBody2D

func _physics_process(delta):
if Input.is_action_just_pressed(“move_right”):
apply_force(Vector2(1125, 0))
if Input.is_action_just_pressed(“move_left”):
apply_force(Vector2(-1125, 0))
if Input.is_action_just_pressed(“move_up”):
apply_force(Vector2(0,-1125))
if Input.is_action_just_pressed(“move_down”):
apply_force(Vector2(1125, 0))

This returns true only a single time when the button is pressed - holding it down doesn’t do anything extra. Replace all of these with is_action_pressed - that returns true for every single frame that the button is held, which is what you want. You’re then also going to have to adjust the magnitudes (values) again, but that part’s easy.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms