:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the VisualInstance.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_VisualInstance: VisualInstance ============== **Inherits:** :ref:`Spatial` **<** :ref:`Node` **<** :ref:`Object` **Inherited By:** :ref:`BakedLightmap`, :ref:`CSGShape`, :ref:`GIProbe`, :ref:`GeometryInstance`, :ref:`Light`, :ref:`ReflectionProbe`, :ref:`RootMotionView` **Category:** Core Brief Description ----------------- Properties ---------- +-----------------------+-----------------------------------------------------+ | :ref:`int` | :ref:`layers` | +-----------------------+-----------------------------------------------------+ Methods ------- +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`get_aabb` **(** **)** const | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_base` **(** **)** const | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_instance` **(** **)** const | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_layer_mask_bit` **(** :ref:`int` layer **)** const | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AABB` | :ref:`get_transformed_aabb` **(** **)** const | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_base` **(** :ref:`RID` base **)** | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_layer_mask_bit` **(** :ref:`int` layer, :ref:`bool` enabled **)** | +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ Property Descriptions --------------------- .. _class_VisualInstance_property_layers: - :ref:`int` **layers** +----------+-----------------------+ | *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 :ref:`Camera`\ s whose cull mask includes the render object this VisualInstance is set to. Method Descriptions ------------------- .. _class_VisualInstance_method_get_aabb: - :ref:`AABB` **get_aabb** **(** **)** const Returns the :ref:`AABB` (also known as the bounding box) for this VisualInstance. ---- .. _class_VisualInstance_method_get_base: - :ref:`RID` **get_base** **(** **)** const ---- .. _class_VisualInstance_method_get_instance: - :ref:`RID` **get_instance** **(** **)** const ---- .. _class_VisualInstance_method_get_layer_mask_bit: - :ref:`bool` **get_layer_mask_bit** **(** :ref:`int` layer **)** const ---- .. _class_VisualInstance_method_get_transformed_aabb: - :ref:`AABB` **get_transformed_aabb** **(** **)** const Returns the transformed :ref:`AABB` (also known as the bounding box) for this VisualInstance. Transformed in this case means the :ref:`AABB` plus the position, rotation, and scale of the :ref:`Spatial`\ s :ref:`Transform` ---- .. _class_VisualInstance_method_set_base: - void **set_base** **(** :ref:`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. ---- .. _class_VisualInstance_method_set_layer_mask_bit: - void **set_layer_mask_bit** **(** :ref:`int` layer, :ref:`bool` enabled **)**