A Collider representing the rectangle with the rounded edges, forming a 2D capsule.
Constructor
inlinenew(x:Float, y:Float, w:Float, h:Float, rotation:Float)
Create a new RoundRect instance.
Parameters:
x | The horizontal position of the rectangle center. |
|---|---|
y | The vertical position of the rectangle center. |
w | The width of the rectangle. |
h | The height of the rectangle. |
rotation | The rotation of the rectangle. |
Variables
Methods
inlinedistanceCenterSq(p:Point):Float
Returns the squared distance of the Point p to the central segment of the capsule
inlinegetNormalAt(p:Point):Point
Returns an outwards normal of of the capsule edge in the direction of the Point p.
Normal points outwards regardless of the Point being inside or outside of the capsule.
