LineShape2D

Inherits: Shape2D < Resource < Reference < Object

Line shape for 2D collisions.

Description

Line shape for 2D collisions. It works like a 2D plane and will not allow any physics 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.

Properties

float d 0.0
Vector2 normal Vector2( 0, -1 )

Property Descriptions

float d

Default 0.0
Setter set_d(value)
Getter get_d()

The line's distance from the origin.

Vector2 normal

Default Vector2( 0, -1 )
Setter set_normal(value)
Getter get_normal()

The line's normal.

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