Simplify and fix Rect2/AABB get_support function

This commit is contained in:
Aaron Franke 2024-08-19 00:28:48 -07:00
parent da5f39889f
commit 7db24a9ad5
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
11 changed files with 97 additions and 35 deletions

View file

@ -112,6 +112,13 @@
Returns the center point of the rectangle. This is the same as [code]position + (size / 2.0)[/code].
</description>
</method>
<method name="get_support" qualifiers="const">
<return type="Vector2" />
<param index="0" name="direction" type="Vector2" />
<description>
Returns the vertex's position of this rect that's the farthest in the given direction. This point is commonly known as the support point in collision detection algorithms.
</description>
</method>
<method name="grow" qualifiers="const">
<return type="Rect2" />
<param index="0" name="amount" type="float" />