9 lines
203 B
GDScript
9 lines
203 B
GDScript
extends RigidBody2D
|
|
|
|
@export var initial_velocity = 800
|
|
@export var direction: float = 0
|
|
|
|
func _ready() -> void:
|
|
rotation = direction
|
|
linear_velocity = Vector2.from_angle(direction) * initial_velocity
|