1 Star 1 Fork 0

天天编程/godot-docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
class_visibilitynotifier.rst 3.04 KB
一键复制 编辑 原始数据 按行查看 历史
github_url: hide

VisibilityNotifier

Inherits: :ref:`Spatial<class_Spatial>` < :ref:`Node<class_Node>` < :ref:`Object<class_Object>`

Inherited By: :ref:`VisibilityEnabler<class_VisibilityEnabler>`

Detects when the node is visible on screen.

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 :ref:`Camera<class_Camera>`'s view.

Properties

:ref:`AABB<class_AABB>` :ref:`aabb<class_VisibilityNotifier_property_aabb>` AABB( -1, -1, -1, 2, 2, 2 )

Methods

:ref:`bool<class_bool>` :ref:`is_on_screen<class_VisibilityNotifier_method_is_on_screen>` ( ) const

Signals

Emitted when the VisibilityNotifier enters a :ref:`Camera<class_Camera>`'s view.


Emitted when the VisibilityNotifier exits a :ref:`Camera<class_Camera>`'s view.


  • screen_entered ( )

Emitted when the VisibilityNotifier enters the screen.


  • screen_exited ( )

Emitted when the VisibilityNotifier exits the screen.

Property Descriptions

Default AABB( -1, -1, -1, 2, 2, 2 )
Setter set_aabb(value)
Getter get_aabb()

The VisibilityNotifier's bounding box.

Method Descriptions

If true, the bounding box is on the screen.

Note: It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return false right after it is instantiated, even if it will be on screen in the draw pass.

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ttcode-net/godot-docs.git
git@gitee.com:ttcode-net/godot-docs.git
ttcode-net
godot-docs
godot-docs
master

搜索帮助