RectangleShape2D

Inherits: Shape2D < Resource < Reference < Object

Category: Core

Brief Description

Rectangle Shape for 2D Physics.

Member Functions

Vector2 get_extents ( ) const
void set_extents ( Vector2 extents )

Description

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

Member Function Description

Vector2 get_extents ( ) const

Return the half extents, the actual width and height of this shape is twice the half extents.

void set_extents ( Vector2 extents )

Set the half extents, the actual width and height of this shape is twice the half extents.

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