class_springbonecollision3d.rst 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/SpringBoneCollision3D.xml.
  6. .. _class_SpringBoneCollision3D:
  7. SpringBoneCollision3D
  8. =====================
  9. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`SpringBoneCollisionCapsule3D<class_SpringBoneCollisionCapsule3D>`, :ref:`SpringBoneCollisionPlane3D<class_SpringBoneCollisionPlane3D>`, :ref:`SpringBoneCollisionSphere3D<class_SpringBoneCollisionSphere3D>`
  11. A base class of the collision that interacts with :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>`.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. A collision can be a child of :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>`. If it is not a child of :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>`, it has no effect.
  16. The colliding and sliding are done in the :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>`'s modification process in order of its collision list which is set by :ref:`SpringBoneSimulator3D.set_collision_path()<class_SpringBoneSimulator3D_method_set_collision_path>`. If :ref:`SpringBoneSimulator3D.are_all_child_collisions_enabled()<class_SpringBoneSimulator3D_method_are_all_child_collisions_enabled>` is ``true``, the order matches :ref:`SceneTree<class_SceneTree>`.
  17. If :ref:`bone<class_SpringBoneCollision3D_property_bone>` is set, it synchronizes with the bone pose of the ancestor :ref:`Skeleton3D<class_Skeleton3D>`, which is done in before the :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>`'s modification process as the pre-process.
  18. \ **Warning:** A scaled **SpringBoneCollision3D** will likely not behave as expected. Make sure that the parent :ref:`Skeleton3D<class_Skeleton3D>` and its bones are not scaled.
  19. .. rst-class:: classref-reftable-group
  20. Properties
  21. ----------
  22. .. table::
  23. :widths: auto
  24. +-------------------------------------+------------------------------------------------------------------------------+--------+
  25. | :ref:`int<class_int>` | :ref:`bone<class_SpringBoneCollision3D_property_bone>` | ``-1`` |
  26. +-------------------------------------+------------------------------------------------------------------------------+--------+
  27. | :ref:`String<class_String>` | :ref:`bone_name<class_SpringBoneCollision3D_property_bone_name>` | ``""`` |
  28. +-------------------------------------+------------------------------------------------------------------------------+--------+
  29. | :ref:`Vector3<class_Vector3>` | :ref:`position_offset<class_SpringBoneCollision3D_property_position_offset>` | |
  30. +-------------------------------------+------------------------------------------------------------------------------+--------+
  31. | :ref:`Quaternion<class_Quaternion>` | :ref:`rotation_offset<class_SpringBoneCollision3D_property_rotation_offset>` | |
  32. +-------------------------------------+------------------------------------------------------------------------------+--------+
  33. .. rst-class:: classref-reftable-group
  34. Methods
  35. -------
  36. .. table::
  37. :widths: auto
  38. +-------------------------------------+------------------------------------------------------------------------------------+
  39. | :ref:`Skeleton3D<class_Skeleton3D>` | :ref:`get_skeleton<class_SpringBoneCollision3D_method_get_skeleton>`\ (\ ) |const| |
  40. +-------------------------------------+------------------------------------------------------------------------------------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Property Descriptions
  45. ---------------------
  46. .. _class_SpringBoneCollision3D_property_bone:
  47. .. rst-class:: classref-property
  48. :ref:`int<class_int>` **bone** = ``-1`` :ref:`🔗<class_SpringBoneCollision3D_property_bone>`
  49. .. rst-class:: classref-property-setget
  50. - |void| **set_bone**\ (\ value\: :ref:`int<class_int>`\ )
  51. - :ref:`int<class_int>` **get_bone**\ (\ )
  52. The index of the attached bone.
  53. .. rst-class:: classref-item-separator
  54. ----
  55. .. _class_SpringBoneCollision3D_property_bone_name:
  56. .. rst-class:: classref-property
  57. :ref:`String<class_String>` **bone_name** = ``""`` :ref:`🔗<class_SpringBoneCollision3D_property_bone_name>`
  58. .. rst-class:: classref-property-setget
  59. - |void| **set_bone_name**\ (\ value\: :ref:`String<class_String>`\ )
  60. - :ref:`String<class_String>` **get_bone_name**\ (\ )
  61. The name of the attached bone.
  62. .. rst-class:: classref-item-separator
  63. ----
  64. .. _class_SpringBoneCollision3D_property_position_offset:
  65. .. rst-class:: classref-property
  66. :ref:`Vector3<class_Vector3>` **position_offset** :ref:`🔗<class_SpringBoneCollision3D_property_position_offset>`
  67. .. rst-class:: classref-property-setget
  68. - |void| **set_position_offset**\ (\ value\: :ref:`Vector3<class_Vector3>`\ )
  69. - :ref:`Vector3<class_Vector3>` **get_position_offset**\ (\ )
  70. The offset of the position from :ref:`Skeleton3D<class_Skeleton3D>`'s :ref:`bone<class_SpringBoneCollision3D_property_bone>` pose position.
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _class_SpringBoneCollision3D_property_rotation_offset:
  74. .. rst-class:: classref-property
  75. :ref:`Quaternion<class_Quaternion>` **rotation_offset** :ref:`🔗<class_SpringBoneCollision3D_property_rotation_offset>`
  76. .. rst-class:: classref-property-setget
  77. - |void| **set_rotation_offset**\ (\ value\: :ref:`Quaternion<class_Quaternion>`\ )
  78. - :ref:`Quaternion<class_Quaternion>` **get_rotation_offset**\ (\ )
  79. The offset of the rotation from :ref:`Skeleton3D<class_Skeleton3D>`'s :ref:`bone<class_SpringBoneCollision3D_property_bone>` pose rotation.
  80. .. rst-class:: classref-section-separator
  81. ----
  82. .. rst-class:: classref-descriptions-group
  83. Method Descriptions
  84. -------------------
  85. .. _class_SpringBoneCollision3D_method_get_skeleton:
  86. .. rst-class:: classref-method
  87. :ref:`Skeleton3D<class_Skeleton3D>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SpringBoneCollision3D_method_get_skeleton>`
  88. Get parent :ref:`Skeleton3D<class_Skeleton3D>` node of the parent :ref:`SpringBoneSimulator3D<class_SpringBoneSimulator3D>` if found.
  89. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  90. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  91. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  92. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  93. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  94. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  95. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  96. .. |void| replace:: :abbr:`void (No return value.)`