VisualInstance

Inherits: Spatial < Node < Object

Inherited By: BakedLightmap, Light, RootMotionView, ReflectionProbe, CSGShape, GIProbe, GeometryInstance

Category: Core

Brief Description

Properties

int layers

Methods

AABB get_aabb ( ) const
bool get_layer_mask_bit ( int layer ) const
AABB get_transformed_aabb ( ) const
void set_base ( RID base )
void set_layer_mask_bit ( int layer, bool enabled )

Property Descriptions

Setter set_layer_mask(value)
Getter get_layer_mask()

The render layer(s) this VisualInstance is drawn on.

This object will only be visible for Cameras whose cull mask includes the render object this VisualInstance is set to.

Method Descriptions

  • AABB get_aabb ( ) const

Returns the AABB (also known as the bounding box) for this VisualInstance.

  • bool get_layer_mask_bit ( int layer ) const
  • AABB get_transformed_aabb ( ) const

Returns the transformed AABB (also known as the bounding box) for this VisualInstance.

Transformed in this case means the AABB plus the position, rotation, and scale of the Spatials Transform

  • void set_base ( RID base )

Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood.

It is recommended to only use set_base if you know what you’re doing.

  • void set_layer_mask_bit ( int layer, bool enabled )