PopochiuWalkableArea
Inherits: Node2D
Description
Defines navigable areas where characters can walk within a room.
The walkable area is delimited by a NavigationRegion2D child named Perimeter. Rooms can have multiple walkable areas that can be enabled or disabled at runtime.
Properties
| Type | Name | Default |
|---|---|---|
| Variant | description | '' |
| Variant | enabled | true |
| Array[PackedVector2Array] | interaction_polygon | [] |
| Variant | interaction_polygon_position | Vector2.ZERO |
| RID | map_rid | |
| RID | map_rid_no_obstacles | |
| RID | region_rid | |
| RID | region_rid_no_obstacles | |
| Variant | script_name | '' |
Signals
- enabled_changed(value: bool)
Signal Descriptions
enabled_changed
signal enabled_changed(value: bool)
Emitted when enabled changes so the room can react (e.g. switch active maps).
Property Descriptions
description
@export var description = ''
Can be used to show the name of the area to players.
enabled
@export var enabled = true
- Setter:
_set_enabled
Whether the area is or not enabled.
interaction_polygon
@export var interaction_polygon : Array[PackedVector2Array] = []
Stores the outlines to assign to the NavigationRegion2D/NavigationPolygon child during
runtime. This is used by PopochiuRoom to store the info in its .tscn.
interaction_polygon_position
@export var interaction_polygon_position = Vector2.ZERO
Stores the position to assign to the NavigationRegion2D/NavigationPolygon child during
runtime. This is used by PopochiuRoom to store the info in its .tscn.
map_rid
var map_rid : RID
Property used by PopochiuRooms to activate the map of this area in the NavigationServer2D.
map_rid_no_obstacles
var map_rid_no_obstacles : RID
Property used by PopochiuRooms to activate the map of this area in the NavigationServer2D
for characters ignoring obstacles.
region_rid
var region_rid : RID
Used to assign a map in the NavigationServer2D to the region RID of the $Perimeter
child.
region_rid_no_obstacles
var region_rid_no_obstacles : RID
Used to assign a map in the NavigationServer2D to the region RID of the $Perimeter
child, for characters ignoring obstacles.
script_name
@export var script_name = ''
The identifier of the object used in scripts.