Last changes
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
extends RigidBody2D
|
||||
extends CharacterBody2D
|
||||
|
||||
@export var initial_velocity = 800
|
||||
@export var speed = 800
|
||||
@export var direction: float = 0
|
||||
|
||||
func _ready() -> void:
|
||||
rotation = direction
|
||||
linear_velocity = Vector2.from_angle(direction) * initial_velocity
|
||||
|
||||
func _physics_process(delta) -> void:
|
||||
var collisions = move_and_collide(direction * speed * delta)
|
||||
|
||||
Reference in New Issue
Block a user