PRZESZKODY - KOD GRACZA
Kandif
swift
09/11/2023 12:14 PM
336 B
119
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...