B2.PolygonShape:setAsBox: Difference between revisions

From GiderosMobile
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
<languages />
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]]<br/>
'''Class:''' [[Special:MyLanguage/b2.PolygonShape|b2.PolygonShape]]<br/>
=== <translate>Description</translate> ===
 
<translate><br />
=== Description ===
Build vertices to represent an oriented box.<br />
Builds vertices to represent an oriented box.
<br /></translate>
<source lang="lua">
<source lang="lua">
b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
b2.PolygonShape:setAsBox(hx,hy,centerx,centery,angle)
</source>
</source>
=== <translate>Parameters</translate> ===
 
'''hx''': (number) <translate>the half-width</translate> <br/>
=== Parameters ===
'''hy''': (number) <translate>the half-heigh</translate> <br/>
'''hx''': (number) the half-width <br/>
'''centerx''': (number, default = 0) <translate>the x coordinate of the center of the box in local coordinates</translate> <br/>
'''hy''': (number) the half-heigh <br/>
'''centery''': (number, default = 0) <translate>the y coordinate of the center of the box in local coordinates</translate> <br/>
'''centerx''': (number, default = 0) the x coordinate of the center of the box in local coordinates <br/>
'''angle''': (number, default = 0) <translate>the rotation of the box in local coordinates</translate> <br/>
'''centery''': (number, default = 0) the y coordinate of the center of the box in local coordinates <br/>
'''angle''': (number, default = 0) the rotation of the box in local coordinates <br/>
 
{{B2.PolygonShape}}

Revision as of 19:51, 17 February 2020


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




LiquidFun