Explorar o código

Improve the VisibilityEnabler and VisibilityNotifier documentations

This closes #4803.

(cherry picked from commit 7f2d60210672fb046b8c2bfffa9f6c55af0393ac)
Hugo Locurcio %!s(int64=5) %!d(string=hai) anos
pai
achega
3a2cdf7d5b

+ 3 - 2
doc/classes/VisibilityEnabler.xml

@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="VisibilityEnabler" inherits="VisibilityNotifier" version="3.2">
 <class name="VisibilityEnabler" inherits="VisibilityNotifier" version="3.2">
 	<brief_description>
 	<brief_description>
-		Enables certain nodes only when visible.
+		Enables certain nodes only when approximately visible.
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
 		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.
 		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.
-		Note that VisibilityEnabler will not affect nodes added after scene initialization.
+		[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.
+		[b]Note:[/b] VisibilityEnabler will not affect nodes added after scene initialization.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>

+ 3 - 2
doc/classes/VisibilityEnabler2D.xml

@@ -1,11 +1,12 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" version="3.2">
 <class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" version="3.2">
 	<brief_description>
 	<brief_description>
-		Enables certain nodes only when visible.
+		Enables certain nodes only when approximately visible.
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
 		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.
 		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.
-		Note that VisibilityEnabler2D will not affect nodes added after scene initialization.
+		[b]Note:[/b] VisibilityEnabler2D uses an approximate heuristic for performance reasons. If you need exact 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.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>

+ 2 - 1
doc/classes/VisibilityNotifier.xml

@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="VisibilityNotifier" inherits="Spatial" version="3.2">
 <class name="VisibilityNotifier" inherits="Spatial" version="3.2">
 	<brief_description>
 	<brief_description>
-		Detects when the node is visible on screen.
+		Detects approximately when the node is visible on screen.
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
 		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.
 		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.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>

+ 2 - 1
doc/classes/VisibilityNotifier2D.xml

@@ -1,10 +1,11 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml version="1.0" encoding="UTF-8" ?>
 <class name="VisibilityNotifier2D" inherits="Node2D" version="3.2">
 <class name="VisibilityNotifier2D" inherits="Node2D" version="3.2">
 	<brief_description>
 	<brief_description>
-		Detects when the node is visible on screen.
+		Detects approximately when the node is visible on screen.
 	</brief_description>
 	</brief_description>
 	<description>
 	<description>
 		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.
 		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] VisibilityNotifier2D uses an approximate heuristic for performance reasons. If you need exact visibility checking, use another method such as adding an [Area2D] node as a child of a [Camera2D] node.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>