RayShape

Inherits: Shape < Resource < Reference < Object

Ray shape for 3D collisions.

Description

Ray shape for 3D collisions, which can be set into a PhysicsBody or Area. 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

1.0

bool

slips_on_slope

false

Property Descriptions

float length

Default

1.0

Setter

set_length(value)

Getter

get_length()

The ray's length.

bool slips_on_slope

Default

false

Setter

set_slips_on_slope(value)

Getter

get_slips_on_slope()

If true, allow the shape to return the correct normal.

© 2014–2021 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.3/classes/class_rayshape.html