From 0e44834cd3244e0683c1801ac9e27049927944a0 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 18 Jul 2020 00:29:03 +0200 Subject: [PATCH] Improve the VisibilityNotifier and VisibilityEnabler class descriptions (cherry picked from commit ce57cc43dd9a2a540a5050e3023a13516599268e) --- doc/classes/VisibilityEnabler.xml | 3 ++- doc/classes/VisibilityEnabler2D.xml | 3 ++- doc/classes/VisibilityNotifier.xml | 3 ++- doc/classes/VisibilityNotifier2D.xml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml index 763e3c49785..4917eba8ca8 100644 --- a/doc/classes/VisibilityEnabler.xml +++ b/doc/classes/VisibilityEnabler.xml @@ -5,7 +5,8 @@ The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself. - [b]Note:[/b] VisibilityEnabler uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area] node as a child of a [Camera] node. + If you just want to receive notifications, use [VisibilityNotifier] instead. + [b]Note:[/b] VisibilityEnabler uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area] node as a child of a [Camera] node and/or [method Vector3.dot]. [b]Note:[/b] VisibilityEnabler will not affect nodes added after scene initialization. diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index 1cb0c3fc5ab..e00f9dc03e7 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -5,7 +5,8 @@ The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect nodes with the same root node as the VisibilityEnabler2D, and the root node itself. - [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. + If you just want to receive notifications, use [VisibilityNotifier2D] instead. + [b]Note:[/b] For performance reasons, VisibilityEnabler2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. [b]Note:[/b] VisibilityEnabler2D will not affect nodes added after scene initialization. diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml index 67d650db8b5..5b628a1487f 100644 --- a/doc/classes/VisibilityNotifier.xml +++ b/doc/classes/VisibilityNotifier.xml @@ -5,7 +5,8 @@ The VisibilityNotifier detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera]'s view. - [b]Note:[/b] VisibilityNotifier uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account. If you need exact visibility checking, use another method such as adding an [Area] node as a child of a [Camera] node. + If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler] instead. + [b]Note:[/b] VisibilityNotifier uses an approximate heuristic for performance reasons. It does't take walls and other occlusion into account. The heuristic is an implementation detail and may change in future versions. If you need precise visibility checking, use another method such as adding an [Area] node as a child of a [Camera] node and/or [method Vector3.dot]. diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index a86ba38126c..fb0fa7a8d78 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -5,7 +5,8 @@ The VisibilityNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport. - [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node. + If you want nodes to be disabled automatically when they exit the screen, use [VisibilityEnabler2D] instead. + [b]Note:[/b] For performance reasons, VisibilityNotifier2D uses an approximate heuristic with precision determined by [member ProjectSettings.world/2d/cell_size]. If you need precise visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.