![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | deezy |
as the title says, while holding the directional button it will only move one, and not continually. here is my code and under the debugger says something but i cant seem to find the answer or figure out what they mean. i am new to coding so i would appreciate anything that can help me out, or direct me to a source that might be helpful in the future.
extends KinematicBody2D
var velocity = Vector2()
func _physics_process(delta):
velocity.y += 0
if Input.is_action_just_pressed(“ui_right”):
velocity.x = 100
elif Input.is_action_just_pressed(“ui_left”):
velocity.x = -100
else:
velocity.x = 0
move_and_slide(velocity)
pass
W 0:00:10:0471 The function ‘move_and_slide()’ returns a value, but this value is never used.
W 0:00:10:0471 The argument ‘delta’ is never used in the function ‘_set_physics_process’.