:github_url: hide

.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the RootMotionView.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.

.. _class_RootMotionView:

RootMotionView
==============

**Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`CullInstance<class_CullInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`

Editor-only helper for setting up root motion in :ref:`AnimationTree<class_AnimationTree>`.

Description
-----------

*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>`.

**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.

Tutorials
---------

- `#root-motion <../tutorials/animation/animation_tree.html#root-motion>`_ in :doc:`../tutorials/animation/animation_tree`

Properties
----------

+---------------------------------+---------------------------------------------------------------------+
| :ref:`NodePath<class_NodePath>` | :ref:`animation_path<class_RootMotionView_property_animation_path>` |
+---------------------------------+---------------------------------------------------------------------+
| :ref:`float<class_float>`       | :ref:`cell_size<class_RootMotionView_property_cell_size>`           |
+---------------------------------+---------------------------------------------------------------------+
| :ref:`Color<class_Color>`       | :ref:`color<class_RootMotionView_property_color>`                   |
+---------------------------------+---------------------------------------------------------------------+
| :ref:`float<class_float>`       | :ref:`radius<class_RootMotionView_property_radius>`                 |
+---------------------------------+---------------------------------------------------------------------+
| :ref:`bool<class_bool>`         | :ref:`zero_y<class_RootMotionView_property_zero_y>`                 |
+---------------------------------+---------------------------------------------------------------------+

Property Descriptions
---------------------

.. _class_RootMotionView_property_animation_path:

- :ref:`NodePath<class_NodePath>` **animation_path**

+----------+---------------------------+
| *Setter* | set_animation_path(value) |
+----------+---------------------------+
| *Getter* | get_animation_path()      |
+----------+---------------------------+

Path to an :ref:`AnimationTree<class_AnimationTree>` node to use as a basis for root motion.

----

.. _class_RootMotionView_property_cell_size:

- :ref:`float<class_float>` **cell_size**

+----------+----------------------+
| *Setter* | set_cell_size(value) |
+----------+----------------------+
| *Getter* | get_cell_size()      |
+----------+----------------------+

The grid's cell size in 3D units.

----

.. _class_RootMotionView_property_color:

- :ref:`Color<class_Color>` **color**

+----------+------------------+
| *Setter* | set_color(value) |
+----------+------------------+
| *Getter* | get_color()      |
+----------+------------------+

The grid's color.

----

.. _class_RootMotionView_property_radius:

- :ref:`float<class_float>` **radius**

+----------+-------------------+
| *Setter* | set_radius(value) |
+----------+-------------------+
| *Getter* | get_radius()      |
+----------+-------------------+

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.

----

.. _class_RootMotionView_property_zero_y:

- :ref:`bool<class_bool>` **zero_y**

+----------+-------------------+
| *Setter* | set_zero_y(value) |
+----------+-------------------+
| *Getter* | get_zero_y()      |
+----------+-------------------+

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.

.. |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.)`