Godot Version
godot version 4
Question
as the title suggests, whenever I press up and down to make the player move, instead of running continuously, it only runs one step and I must press again to make the player move again
here’s the code
extends StaticBody2D
@export var speed = 1000
var win_hight : int
var p_hight : int
# Called when the node enters the scene tree for the first time.
func _ready():
win_hight = get_viewport_rect().size.y
p_hight = $ColorRect.get_size().y
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if Input.is_action_just_pressed("ui_up"):
position.y -= get_parent().Paddle_Speed * delta
elif Input.is_action_just_pressed("ui_down"):
position.y += get_parent().Paddle_Speed * delta