WorldBoundaryShape2D

Inherits: Shape2D < Resource < RefCounted < Object

World boundary shape for 2D collisions.

Description

World boundary 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

distance

0.0

Vector2

normal

Vector2(0, -1)

Property Descriptions

Default

0.0

Setter

set_distance(value)

Getter

get_distance()

The line's distance from the origin.


Default

Vector2(0, -1)

Setter

set_normal(value)

Getter

get_normal()

The line's normal. Defaults to Vector2.UP.