12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/LOD.xml.
- .. _class_LOD:
- LOD
- ===
- **Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- Provides discrete level of detail.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Automatically hides and shows :ref:`Spatial<class_Spatial>` children depending on the distance from the closest :ref:`Camera<class_Camera>` to the **LOD** node. Child nodes that don't inherit from :ref:`Spatial<class_Spatial>` are ignored by the LOD system.
- Children are shown in order with the first children shown when closest to the :ref:`Camera<class_Camera>`, and the latter children shown when further away.
- The threshold distances for changes are determined by :ref:`Spatial.lod_range<class_Spatial_property_lod_range>`.
- For example, a first child with a range of ``2`` will be shown from distance 0 to 2. A second child with a range of ``5`` will be shown from distance 2 to 7, etc.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +---------------------------+------------------------------------------------------+---------+
- | :ref:`float<class_float>` | :ref:`hysteresis<class_LOD_property_hysteresis>` | ``1.0`` |
- +---------------------------+------------------------------------------------------+---------+
- | :ref:`int<class_int>` | :ref:`lod_priority<class_LOD_property_lod_priority>` | ``0`` |
- +---------------------------+------------------------------------------------------+---------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_LOD_property_hysteresis:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **hysteresis** = ``1.0``
- .. rst-class:: classref-property-setget
- - void **set_hysteresis** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_hysteresis** **(** **)**
- To prevent flickering at borders, a hysteresis distance will be added to threshold distances when the object is moving away from the :ref:`Camera<class_Camera>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_LOD_property_lod_priority:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **lod_priority** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_lod_priority** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_lod_priority** **(** **)**
- Determines the rate at which level of detail will be updated.
- Higher priorities will update faster, but use more CPU.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|