B2.PolygonShape:setAsBox: Difference between revisions
From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Build vertices to represent an oriented box.<br /> <br /> <source lang="lua"> = b2.PolygonShape..." |
No edit summary |
||
| Line 6: | Line 6: | ||
<br /> | <br /> | ||
<source lang="lua"> | <source lang="lua"> | ||
b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle) | |||
</source> | </source> | ||
'''hx | '''hx''': (number) the half-width ''''''<br/> | ||
'''hy | '''hy''': (number) the half-heigh ''''''<br/> | ||
'''centerx | '''centerx''': (number, default = 0) the x coordinate of the center of the box in local coordinates ''''''<br/> | ||
'''centery | '''centery''': (number, default = 0) the y coordinate of the center of the box in local coordinates ''''''<br/> | ||
'''angle | '''angle''': (number, default = 0) the rotation of the box in local coordinates ''''''<br/> | ||
Revision as of 09:19, 23 August 2018
Available since: Gideros 2011.6
Description
Build vertices to represent an oriented box.
b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
'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 '