VisibilityEnabler

Inherits: VisibilityNotifier < Spatial < Node < Object

Enables certain nodes only when 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.

Methods

boolis_enabler_enabled ( Enabler enabler ) const
voidset_enabler ( Enabler enabler, bool enabled )

Enumerations

enum Enabler:

  • ENABLER_PAUSE_ANIMATIONS = 0 — This enabler will pause AnimationPlayer nodes.
  • ENABLER_FREEZE_BODIES = 1 — This enabler will freeze RigidBody nodes.
  • ENABLER_MAX = 2 — Represents the size of the Enabler enum.

Property Descriptions

Defaulttrue
Setterset_enabler(value)
Getteris_enabler_enabled()

If true, RigidBody nodes will be paused.


  • bool pause_animations
Defaulttrue
Setterset_enabler(value)
Getteris_enabler_enabled()

If true, AnimationPlayer nodes will be paused.

Method Descriptions

Returns whether the enabler identified by given Enabler constant is active.


Sets active state of the enabler identified by given Enabler constant.

Doc ID missing

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 1970-01-01 at 00:00:00. It’s the English Stable version because it’s what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.