godot-docs/scripts/icon.gd

12 lines
217 B
GDScript3
Raw Normal View History

extends Sprite2D
var speed = 400
var angular_speed = PI
func _process(delta: float) -> void:
rotation += angular_speed * delta
var velocity = Vector2.UP.rotated(rotation) * speed
position += velocity * delta