VisibilityEnabler¶
Inherits: VisibilityNotifier < CullInstance < Spatial < Node < Object
Enables certain nodes only when approximately visible.
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.
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.
Properties¶
|
||
|
Methods¶
is_enabler_enabled ( Enabler enabler ) const |
|
void |
set_enabler ( Enabler enabler, bool enabled ) |
Enumerations¶
enum Enabler:
Enabler ENABLER_PAUSE_ANIMATIONS = 0
This enabler will pause AnimationPlayer nodes.
Enabler ENABLER_FREEZE_BODIES = 1
This enabler will freeze RigidBody nodes.
Enabler ENABLER_MAX = 2
Represents the size of the Enabler enum.
Property Descriptions¶
bool freeze_bodies = true
If true
, RigidBody nodes will be paused.
bool pause_animations = true
If true
, AnimationPlayer nodes will be paused.
Method Descriptions¶
bool is_enabler_enabled ( Enabler enabler ) const
Returns whether the enabler identified by given Enabler constant is active.
void set_enabler ( Enabler enabler, bool enabled )
Sets active state of the enabler identified by given Enabler constant.