VisibilityEnabler¶
Inherits: VisibilityNotifier < CullInstance < Spatial < Node < Object
Habilita ciertos nodos sólo cuando son aproximadamente visibles.
Descripción¶
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.
If you just want to receive notifications, use VisibilityNotifier instead.
Note: VisibilityEnabler uses an approximate heuristic for performance reasons. It doesn't take walls and other occlusion into account (unless you are using Portals). 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 Vector3.dot.
Note: VisibilityEnabler will not affect nodes added after scene initialization.
Propiedades¶
|
||
|
Métodos¶
is_enabler_enabled ( Enabler enabler ) const |
|
void |
set_enabler ( Enabler enabler, bool enabled ) |
Enumeraciones¶
enum Enabler:
ENABLER_PAUSE_ANIMATIONS = 0 --- Este habilitador hará una pausa en los nodos AnimationPlayer.
ENABLER_FREEZE_BODIES = 1 --- This enabler will freeze RigidBody nodes.
ENABLER_MAX = 2 --- Representa el tamaño del enum Enabler.
Descripciones de Propiedades¶
bool freeze_bodies
Default |
|
Setter |
set_enabler(value) |
Getter |
is_enabler_enabled() |
If true
, RigidBody nodes will be paused.
bool pause_animations
Default |
|
Setter |
set_enabler(value) |
Getter |
is_enabler_enabled() |
Si true
, los nodos de AnimationPlayer estarán en pausa.
Descripciones de Métodos¶
Devuelve si el habilitador identificado por la constante Enabler dada está activo.
Establece el estado activo del activador identificado por una constante Enabler dada.