SeparationRayShape2D

Inherits: Shape2D < Resource < RefCounted < Object

Separation ray shape for 2D collisions.

Description

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

Properties

float

length

20.0

bool

slide_on_slope

false

Property Descriptions

Default

20.0

Setter

set_length(value)

Getter

get_length()

The ray's length.


  • bool slide_on_slope

Default

false

Setter

set_slide_on_slope(value)

Getter

get_slide_on_slope()

If false (default), the shape always separates and returns a normal along its own direction.

If true, the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes.