.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.

.. _class_CapsuleShape2D:

CapsuleShape2D
==============

**Inherits:** :ref:`Shape2D<class_shape2d>` **<** :ref:`Resource<class_resource>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`

**Category:** Core

Brief Description
-----------------

Capsule 2D shape resource for physics.

Member Functions
----------------

+----------------------------+---------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>`  | :ref:`get_height<class_CapsuleShape2D_get_height>`  **(** **)** const                             |
+----------------------------+---------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>`  | :ref:`get_radius<class_CapsuleShape2D_get_radius>`  **(** **)** const                             |
+----------------------------+---------------------------------------------------------------------------------------------------+
| void                       | :ref:`set_height<class_CapsuleShape2D_set_height>`  **(** :ref:`float<class_float>` height  **)** |
+----------------------------+---------------------------------------------------------------------------------------------------+
| void                       | :ref:`set_radius<class_CapsuleShape2D_set_radius>`  **(** :ref:`float<class_float>` radius  **)** |
+----------------------------+---------------------------------------------------------------------------------------------------+

Member Variables
----------------

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

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

Capsule 2D shape resource for physics. A capsule (or sometimes called "pill") is like a line grown in all directions. It has a radius and a height, and is often useful for modeling biped characters.

Member Function Description
---------------------------

.. _class_CapsuleShape2D_get_height:

- :ref:`float<class_float>`  **get_height**  **(** **)** const

Return the height of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.

.. _class_CapsuleShape2D_get_radius:

- :ref:`float<class_float>`  **get_radius**  **(** **)** const

Return the radius of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.

.. _class_CapsuleShape2D_set_height:

- void  **set_height**  **(** :ref:`float<class_float>` height  **)**

Set the height of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.

.. _class_CapsuleShape2D_set_radius:

- void  **set_radius**  **(** :ref:`float<class_float>` radius  **)**

Set the radius of the :ref:`CapsuleShape2D<class_capsuleshape2d>`.


