/Godot 3.1


Inherits: Shape2D < Resource < Reference < Object

Category: Core

Brief Description

Line shape for 2D collisions.


float d
Vector2 normal


Line shape for 2D collisions. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame.

Property Descriptions

float d

Setter set_d(value)
Getter get_d()

The line’s distance from the origin.

Vector2 normal

Setter set_normal(value)
Getter get_normal()

The line’s normal.

© 2014–2019 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.