123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- :github_url: hide
- .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
- .. DO NOT EDIT THIS FILE, but the SkeletonModification3DLookAt.xml source instead.
- .. The source is found in doc/classes or modules/<name>/doc_classes.
- .. _class_SkeletonModification3DLookAt:
- SkeletonModification3DLookAt
- ============================
- **Inherits:** :ref:`SkeletonModification3D<class_SkeletonModification3D>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- A modification that rotates a bone to look at a target.
- Description
- -----------
- This :ref:`SkeletonModification3D<class_SkeletonModification3D>` rotates a bone to look a target. This is extremely helpful for moving character's heads to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily.
- Properties
- ----------
- +---------------------------------+-------------------------------------------------------------------------------------+------------------+
- | :ref:`int<class_int>` | :ref:`bone_index<class_SkeletonModification3DLookAt_property_bone_index>` | ``-2`` |
- +---------------------------------+-------------------------------------------------------------------------------------+------------------+
- | :ref:`String<class_String>` | :ref:`bone_name<class_SkeletonModification3DLookAt_property_bone_name>` | ``""`` |
- +---------------------------------+-------------------------------------------------------------------------------------+------------------+
- | :ref:`NodePath<class_NodePath>` | :ref:`target_nodepath<class_SkeletonModification3DLookAt_property_target_nodepath>` | ``NodePath("")`` |
- +---------------------------------+-------------------------------------------------------------------------------------+------------------+
- Methods
- -------
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`get_additional_rotation<class_SkeletonModification3DLookAt_method_get_additional_rotation>` **(** **)** |const| |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`int<class_int>` | :ref:`get_lock_rotation_plane<class_SkeletonModification3DLookAt_method_get_lock_rotation_plane>` **(** **)** |const| |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`bool<class_bool>` | :ref:`get_lock_rotation_to_plane<class_SkeletonModification3DLookAt_method_get_lock_rotation_to_plane>` **(** **)** |const| |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_additional_rotation<class_SkeletonModification3DLookAt_method_set_additional_rotation>` **(** :ref:`Vector3<class_Vector3>` additional_rotation **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_lock_rotation_plane<class_SkeletonModification3DLookAt_method_set_lock_rotation_plane>` **(** :ref:`int<class_int>` plane **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | void | :ref:`set_lock_rotation_to_plane<class_SkeletonModification3DLookAt_method_set_lock_rotation_to_plane>` **(** :ref:`bool<class_bool>` lock_to_plane **)** |
- +-------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
- Property Descriptions
- ---------------------
- .. _class_SkeletonModification3DLookAt_property_bone_index:
- - :ref:`int<class_int>` **bone_index**
- +-----------+-----------------------+
- | *Default* | ``-2`` |
- +-----------+-----------------------+
- | *Setter* | set_bone_index(value) |
- +-----------+-----------------------+
- | *Getter* | get_bone_index() |
- +-----------+-----------------------+
- The bone index of the bone that should be operated on by this modification.
- When possible, this will also update the :ref:`bone_name<class_SkeletonModification3DLookAt_property_bone_name>` based on data provided by the :ref:`Skeleton3D<class_Skeleton3D>`.
- ----
- .. _class_SkeletonModification3DLookAt_property_bone_name:
- - :ref:`String<class_String>` **bone_name**
- +-----------+----------------------+
- | *Default* | ``""`` |
- +-----------+----------------------+
- | *Setter* | set_bone_name(value) |
- +-----------+----------------------+
- | *Getter* | get_bone_name() |
- +-----------+----------------------+
- The name of the bone that should be operated on by this modification.
- When possible, this will also update the :ref:`bone_index<class_SkeletonModification3DLookAt_property_bone_index>` based on data provided by the :ref:`Skeleton3D<class_Skeleton3D>`.
- ----
- .. _class_SkeletonModification3DLookAt_property_target_nodepath:
- - :ref:`NodePath<class_NodePath>` **target_nodepath**
- +-----------+------------------------+
- | *Default* | ``NodePath("")`` |
- +-----------+------------------------+
- | *Setter* | set_target_node(value) |
- +-----------+------------------------+
- | *Getter* | get_target_node() |
- +-----------+------------------------+
- The NodePath to the node that is the target for the modification.
- Method Descriptions
- -------------------
- .. _class_SkeletonModification3DLookAt_method_get_additional_rotation:
- - :ref:`Vector3<class_Vector3>` **get_additional_rotation** **(** **)** |const|
- Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes.
- ----
- .. _class_SkeletonModification3DLookAt_method_get_lock_rotation_plane:
- - :ref:`int<class_int>` **get_lock_rotation_plane** **(** **)** |const|
- Returns the plane that the LookAt modification is limiting rotation to.
- ----
- .. _class_SkeletonModification3DLookAt_method_get_lock_rotation_to_plane:
- - :ref:`bool<class_bool>` **get_lock_rotation_to_plane** **(** **)** |const|
- Returns whether the LookAt modification is limiting rotation to a single plane in 3D space.
- ----
- .. _class_SkeletonModification3DLookAt_method_set_additional_rotation:
- - void **set_additional_rotation** **(** :ref:`Vector3<class_Vector3>` additional_rotation **)**
- Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result.
- ----
- .. _class_SkeletonModification3DLookAt_method_set_lock_rotation_plane:
- - void **set_lock_rotation_plane** **(** :ref:`int<class_int>` plane **)**
- ----
- .. _class_SkeletonModification3DLookAt_method_set_lock_rotation_to_plane:
- - void **set_lock_rotation_to_plane** **(** :ref:`bool<class_bool>` lock_to_plane **)**
- When ``true``, the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the ``set_lock_rotation_plane`` function.
- .. |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.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|