Skip to content
0.2.0-dev Download ZIP
19 lines ·982 B Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="RectangleShape2D" inherits="Shape2D" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 A 2D rectangle shape used for physics collision.
5 </brief_description>
6 <description>
7 A 2D rectangle shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape2D].
8 [b]Performance:[/b] [RectangleShape2D] is fast to check collisions against. It is faster than [CapsuleShape2D], but slower than [CircleShape2D].
9 </description>
10 <tutorials>
11 <link title="2D Pong Demo">https://godotengine.org/asset-library/asset/2728</link>
12 <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/2719</link>
13 </tutorials>
14 <members>
15 <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(20, 20)">
16 The rectangle's width and height.
17 </member>
18 </members>
19</class>