浏览代码

Merge pull request #73002 from KoBeWi/VisibleOnScreenConfusion

Clarify visibility in VisibleOnScreenNotifier
Rémi Verschelde 2 年之前
父节点
当前提交
7a68530bf3
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 0
      doc/classes/VisibleOnScreenNotifier2D.xml
  2. 1 1
      doc/classes/VisibleOnScreenNotifier3D.xml

+ 1 - 0
doc/classes/VisibleOnScreenNotifier2D.xml

@@ -6,6 +6,7 @@
 	<description>
 	<description>
 		The VisibleOnScreenNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
 		The VisibleOnScreenNotifier2D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a viewport.
 		If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler2D] instead.
 		If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler2D] instead.
+		[b]Note:[/b] VisibleOnScreenNotifier2D uses the render culling code to determine whether it's visible on screen, which also means that its [member CanvasItem.visible] must be [code]true[/code] to work correctly.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 		<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
 		<link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>

+ 1 - 1
doc/classes/VisibleOnScreenNotifier3D.xml

@@ -6,7 +6,7 @@
 	<description>
 	<description>
 		The VisibleOnScreenNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view.
 		The VisibleOnScreenNotifier3D detects when it is visible on the screen. It also notifies when its bounding rectangle enters or exits the screen or a [Camera3D]'s view.
 		If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler3D] instead.
 		If you want nodes to be disabled automatically when they exit the screen, use [VisibleOnScreenEnabler3D] instead.
-		[b]Note:[/b] VisibleOnScreenNotifier3D 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 [Area3D] node as a child of a [Camera3D] node and/or [method Vector3.dot].
+		[b]Note:[/b] VisibleOnScreenNotifier3D uses the render culling code to determine whether it's visible on screen, which also means that its [member Node3D.visible] must be [code]true[/code] to work correctly.
 	</description>
 	</description>
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>