Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | potatobanana |
i just start godot few day ago still cant solve this problem
extends KinematicBody2D
var movement = Vector2()
var movement_speed = 100
func _ready():
set_physics_process(true)
pass
func _physics_process(delta):
#walkingmovement
movement.x = Input.is_action_pressed("ui_right") - Input.is_action_pressed("ui_right")
movement.y = Input.is_action_pressed("ui_down") - Input.is_action_pressed("ui_up")
movement = movement.normalized()
var motion = movement * movement_speed * delta
move(motion)
pass