class_rootmotionview.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the RootMotionView.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_RootMotionView:
  6. RootMotionView
  7. ==============
  8. **Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`CullInstance<class_CullInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Editor-only helper for setting up root motion in :ref:`AnimationTree<class_AnimationTree>`.
  10. Description
  11. -----------
  12. *Root motion* refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also :ref:`AnimationTree<class_AnimationTree>`.
  13. **Note:** ``RootMotionView`` is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain :ref:`Node<class_Node>` in the running project. This means a script attached to a ``RootMotionView`` node *must* have ``extends Node`` instead of ``extends RootMotionView``. Additionally, it must not be a ``tool`` script.
  14. Tutorials
  15. ---------
  16. - `#root-motion <../tutorials/animation/animation_tree.html#root-motion>`_ in :doc:`../tutorials/animation/animation_tree`
  17. Properties
  18. ----------
  19. +---------------------------------+---------------------------------------------------------------------+
  20. | :ref:`NodePath<class_NodePath>` | :ref:`animation_path<class_RootMotionView_property_animation_path>` |
  21. +---------------------------------+---------------------------------------------------------------------+
  22. | :ref:`float<class_float>` | :ref:`cell_size<class_RootMotionView_property_cell_size>` |
  23. +---------------------------------+---------------------------------------------------------------------+
  24. | :ref:`Color<class_Color>` | :ref:`color<class_RootMotionView_property_color>` |
  25. +---------------------------------+---------------------------------------------------------------------+
  26. | :ref:`float<class_float>` | :ref:`radius<class_RootMotionView_property_radius>` |
  27. +---------------------------------+---------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`zero_y<class_RootMotionView_property_zero_y>` |
  29. +---------------------------------+---------------------------------------------------------------------+
  30. Property Descriptions
  31. ---------------------
  32. .. _class_RootMotionView_property_animation_path:
  33. - :ref:`NodePath<class_NodePath>` **animation_path**
  34. +----------+---------------------------+
  35. | *Setter* | set_animation_path(value) |
  36. +----------+---------------------------+
  37. | *Getter* | get_animation_path() |
  38. +----------+---------------------------+
  39. Path to an :ref:`AnimationTree<class_AnimationTree>` node to use as a basis for root motion.
  40. ----
  41. .. _class_RootMotionView_property_cell_size:
  42. - :ref:`float<class_float>` **cell_size**
  43. +----------+----------------------+
  44. | *Setter* | set_cell_size(value) |
  45. +----------+----------------------+
  46. | *Getter* | get_cell_size() |
  47. +----------+----------------------+
  48. The grid's cell size in 3D units.
  49. ----
  50. .. _class_RootMotionView_property_color:
  51. - :ref:`Color<class_Color>` **color**
  52. +----------+------------------+
  53. | *Setter* | set_color(value) |
  54. +----------+------------------+
  55. | *Getter* | get_color() |
  56. +----------+------------------+
  57. The grid's color.
  58. ----
  59. .. _class_RootMotionView_property_radius:
  60. - :ref:`float<class_float>` **radius**
  61. +----------+-------------------+
  62. | *Setter* | set_radius(value) |
  63. +----------+-------------------+
  64. | *Getter* | get_radius() |
  65. +----------+-------------------+
  66. The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this :ref:`radius<class_RootMotionView_property_radius>` is reached.
  67. ----
  68. .. _class_RootMotionView_property_zero_y:
  69. - :ref:`bool<class_bool>` **zero_y**
  70. +----------+-------------------+
  71. | *Setter* | set_zero_y(value) |
  72. +----------+-------------------+
  73. | *Getter* | get_zero_y() |
  74. +----------+-------------------+
  75. If ``true``, the grid's points will all be on the same Y coordinate (*local* Y = 0). If ``false``, the points' original Y coordinate is preserved.
  76. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  77. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  78. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`