PRZESZKODY - KOD GRACZA
Kandif
swift
2 years ago
251 B
109
Indexable
extends CharacterBody2D
@export var speed = 200
func get_input():
var input_direction = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
velocity = input_direction * speed
func _physics_process(delta):
get_input()
move_and_slide()
Editor is loading...