B2.PolygonShape:setAsBox: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
=== Description ===
=== <translate>Description</translate> ===
<translate><br />
<translate><br />
Build vertices to represent an oriented box.<br />
Build vertices to represent an oriented box.<br />
Line 8: Line 8:
  b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
  b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
</source>
</source>
=== Parameters ===
=== <translate>Parameters</translate> ===
'''hx''': (number) <translate>the half-width</translate> <br/>
'''hx''': (number) <translate>the half-width</translate> <br/>
'''hy''': (number) <translate>the half-heigh</translate> <br/>
'''hy''': (number) <translate>the half-heigh</translate> <br/>

Revision as of 06:27, 24 August 2018

Available since: Gideros 2011.6

Description


Build vertices to represent an oriented box.

 b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)

Parameters

hx: (number) the half-width
hy: (number) the half-heigh
centerx: (number, default = 0) the x coordinate of the center of the box in local coordinates
centery: (number, default = 0) the y coordinate of the center of the box in local coordinates
angle: (number, default = 0) the rotation of the box in local coordinates