Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
SeparationRayShape2D¶
Inherits: Shape2D < Resource < RefCounted < Object
Separation ray shape resource for 2D physics.
Description¶
2D separation ray shape to be added as a direct child of a PhysicsBody2D or Area2D using a CollisionShape2D node. 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.
Performance: Being a primitive collision shape, SeparationRayShape2D is fast to check collisions against.
Properties¶
|
||
|
Property Descriptions¶
float length = 20.0
The ray's length.
bool slide_on_slope = false
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.