Table of Contents
src / stages / frame / camera_frame.tscn
Diagram
Instantiators
Scene Tree
-
CameraFrame Area2D
-
CollisionShape2D CollisionShape2D
-
Signal Connections
|
Note
|
No signal connections. |
Properties
| Name | Value |
|---|---|
collision_layer |
|
collision_mask |
|
script |
| Name | Value |
|---|---|
unique_name_in_owner |
|
shape |
|
debug_color |
|
camera_frame.gd
extends Area2D
const HALF_SIZE = Vector2(1920, 1080) / 2
static func corner_of(area: Area2D) -> Dictionary:
return {
"left": area.global_position.x - HALF_SIZE.x,
"right": area.global_position.x + HALF_SIZE.x,
"top": area.global_position.y - HALF_SIZE.y,
"bottom": area.global_position.y + HALF_SIZE.y,
}
func corner() -> Dictionary:
return corner_of(self)