Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.88 KB

class_rayshape2d.rst

File metadata and controls

63 lines (41 loc) · 1.88 KB
github_url:hide

RayShape2D

Inherits: :ref:`Shape2D<class_Shape2D>` < :ref:`Resource<class_Resource>` < :ref:`Reference<class_Reference>` < :ref:`Object<class_Object>`

Category: Core

Brief Description

Ray shape for 2D collisions.

Properties

:ref:`float<class_float>` :ref:`length<class_RayShape2D_property_length>`
:ref:`bool<class_bool>` :ref:`slips_on_slope<class_RayShape2D_property_slips_on_slope>`

Description

Ray shape for 2D collisions. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.

Property Descriptions

Setter set_length(value)
Getter get_length()

The ray's length.


Setter set_slips_on_slope(value)
Getter get_slips_on_slope()

If true, allow the shape to return the correct normal. Default value: false.