Difference between revisions of "Shape:getRadius"

(Added reference page for Shape:getRadius)
 
m
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
radius = Shape:getRadius( )
+
radius = Shape:getRadius()
 
</source>
 
</source>
 
From the Box2D manual:
 
From the Box2D manual:
 
<blockquote>
 
<blockquote>
Polygons inherit a radius from [Shape].  The radius creates a skin around the polygon. The skin is used in stacking scenarios to keep polygons slightly separated.  This allows continuous collision to work against the core polygon.
+
Polygons inherit a radius from [[Shape]].  The radius creates a skin around the polygon. The skin is used in stacking scenarios to keep polygons slightly separated.  This allows continuous collision to work against the core polygon.
 
</blockquote>
 
</blockquote>
 
=== Arguments ===
 
=== Arguments ===
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|number|radius|The radius of the shape}}
+
{{param|number|radius|The radius of the shape.}}
 
== See Also ==
 
== See Also ==
 
* [[parent::Shape]]
 
* [[parent::Shape]]

Latest revision as of 04:42, 12 October 2016

Gets the radius of the shape.

Function

Synopsis

radius = Shape:getRadius()

From the Box2D manual:

Polygons inherit a radius from Shape. The radius creates a skin around the polygon. The skin is used in stacking scenarios to keep polygons slightly separated. This allows continuous collision to work against the core polygon.

Arguments

None.

Returns

number radius
The radius of the shape.

See Also


Other Languages