W3cubDocs

/Godot 3.1

RayShape2D

Inherits: Shape2D < Resource < Reference < Object

Category: Core

Brief Description

Ray shape for 2D collisions.

Properties

float length
bool 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

float length

Setter set_length(value)
Getter get_length()

The ray’s length.

bool slips_on_slope

Setter set_slips_on_slope(value)
Getter get_slips_on_slope()

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

© 2014–2019 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
http://docs.godotengine.org/en/3.1/classes/class_rayshape2d.html