Godot Version
4.7.1
Question
Hey guys. So I’m making a space game in which the camera has to freeze if a function triggers. It goes like this:
extends Area2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
position.y += 100 * delta
func _on_body_entered(body: Node2D) -> void:
if body is Player:
#freeze camera, but i have no idea how
I just want to know how to freeze the camera in place. I tried using top level but that just set the global position back to (0, 0)