RectangleCollider

BGE. RectangleCollider

Collider with the shape of a rectangle with top left at (offset_x, offset_y), with given width and height

Constructor

new RectangleCollider(colliderName, argsopt) → {void}

Create a new RectangleCollider

Parameters:
Name Type Attributes Default Description
colliderName string

name of this collider

args object <optional>
{}

additional properties (e.g {width: 10, height: 20})

Properties:
Name Type Description
width float
height float
Source:

Extends

  • Collider

Methods

debugDraw(draw2d, entityX, entityY, coloropt) → {dynamic}

Draws the rectangle outline around the collider

Parameters:
Name Type Attributes Default Description
draw2d object
entityX float
entityY float
color integer <optional>
&hFF0000FF
Source:

refreshColliderRegion() → {void}

Refreshes the collider

Source: