Difference between revisions of "love.physics.newCircleShape"

(Added 0.8.0 variant.)
Line 1: Line 1:
Create a new CircleShape at (x,y) in local coordinates.
+
Creates a circle shape.
 +
 
 
== Function ==
 
== Function ==
 +
{{newin|[[0.8.0]]|type=variant}}
 +
=== Synopsis ===
 +
<source lang="lua">
 +
shape = love.physics.newCircleShape( radius )
 +
</source>
 +
=== Arguments ===
 +
{{param|number|radius|The radius of the circle.}}
 +
=== Returns ===
 +
{{param|CircleShape|shape|The new shape.}}
 +
 +
== Function ==
 +
{{oldin|[[0.8.0]]|type=variant}}
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
Line 12: Line 25:
 
=== Returns ===
 
=== Returns ===
 
{{param|CircleShape|shape|A new CircleShape.}}
 
{{param|CircleShape|shape|A new CircleShape.}}
=== Note ===
+
 
love.physics.newCircleShape() anchors from the center of the shape by default.
 
 
== See Also ==
 
== See Also ==
 
* [[parent::love.physics]]
 
* [[parent::love.physics]]
 
* [[Constructs::CircleShape]]
 
* [[Constructs::CircleShape]]
* [[Constructs::Shape]]
 
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Create a new CircleShape at (x,y) in local coordinates.}}
+
{{#set:Description=Creates a circle shape.}}
 
{{#set:Since=000}}
 
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|love.physics.newCircleShape}}
 
{{i18n|love.physics.newCircleShape}}

Revision as of 21:23, 9 April 2012

Creates a circle shape.

Function

Available since LÖVE 0.8.0
This variant is not supported in earlier versions.

Synopsis

shape = love.physics.newCircleShape( radius )

Arguments

number radius
The radius of the circle.

Returns

CircleShape shape
The new shape.

Function

Removed in LÖVE 0.8.0
This variant is not supported in that and later versions.

Synopsis

shape = love.physics.newCircleShape( body, x, y, radius )

Arguments

Body body
The body to attach the shape to.
number x
The x offset of the circle.
number y
The y offset of the circle.
number radius
The radius of the circle.

Returns

CircleShape shape
A new CircleShape.

See Also


Other Languages