11 lines
229 B
GDScript
11 lines
229 B
GDScript
extends CharacterBody2D
|
|
|
|
@export var speed = 800
|
|
@export var direction: float = 0
|
|
|
|
func _ready() -> void:
|
|
rotation = direction
|
|
|
|
func _physics_process(delta) -> void:
|
|
var collisions = move_and_collide(direction * speed * delta)
|