RectangleShape2D

Inherits: Shape2D < Resource < Reference < Object

Rectangle shape for 2D collisions.

Description

Rectangle shape for 2D collisions. This shape is useful for modeling box-like 2D objects.

Tutorials

Properties

Vector2

extents

Vector2( 10, 10 )

Property Descriptions

Vector2 extents

Default

Vector2( 10, 10 )

Setter

set_extents(value)

Getter

get_extents()

The rectangle's half extents. The width and height of this shape is twice the half extents.

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