Files
wgj26/addons/phantom_camera/examples/scripts/2D/2d_trigger_area.gd
T
bigmstone 2c6a395938 Level 3
Using Level 3 to do a big art pass and get a lot of systems set up and
cleaned up.

Add Phantom Camera addon with comprehensive 2D/3D camera system
2026-10-04 02:21:46 -06:00

17 lines
396 B
GDScript

extends Area2D
@export var area_pcam: PhantomCamera2D
func _ready() -> void:
connect("area_entered", _entered_area)
connect("area_exited", _exited_area)
func _entered_area(area_2d: Area2D) -> void:
if area_2d.get_parent() is CharacterBody2D:
area_pcam.set_priority(20)
func _exited_area(area_2d: Area2D) -> void:
if area_2d.get_parent() is CharacterBody2D:
area_pcam.set_priority(0)