Skip to content

Shelter ​

Inherits: RefCounted

Questions about the shelter volumes of the world: how sheltered is a point, by which volume. The weather system asks it for the camera (the screen look, the sound) and for entities (the exposed effects).

Methods ​

ShelterVolumevolume_at( tree: SceneTree, point: Vector3 ) static
floatamount_at( tree: SceneTree, point: Vector3 ) static
boolprotects_at( tree: SceneTree, point: Vector3 ) static
Variantcamera_position( tree: SceneTree ) static
floatamount_at_camera() static

Method descriptions ​

ShelterVolume volume_at( tree: SceneTree, point: Vector3 ) ​

The best shelter at a point: the volume with the most amount among those the point is inside (ties: the first). Null when the point is in the open

float amount_at( tree: SceneTree, point: Vector3 ) ​

How sheltered a point is: the amount of its best shelter (0 in the open)

bool protects_at( tree: SceneTree, point: Vector3 ) ​

Is an entity at this point protected from the exposed effects of the weather? (inside a volume that protects, whose amount is above 0)

Variant camera_position( tree: SceneTree ) ​

The position of the camera of the game (null when there is none)

float amount_at_camera() ​

How sheltered the camera of the game is now (0 in the open): what the screen look and the condition Is sheltered use