B2.PolygonShape:setAsBox: Difference between revisions
From GiderosMobile
No edit summary |
m Text replacement - "</source" to "</syntaxhighlight" |
||
| (One intermediate revision by the same user not shown) | |||
| Line 6: | Line 6: | ||
=== Description === | === Description === | ||
Builds vertices to represent an oriented box. | Builds vertices to represent an oriented box. | ||
< | <syntaxhighlight lang="lua"> | ||
b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle) | b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle) | ||
</ | </syntaxhighlight> | ||
=== Parameters === | === Parameters === | ||
Latest revision as of 16:11, 12 July 2023
Available since: Gideros 2011.6
Class: b2.PolygonShape
Description
Builds 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