Difference between revisions of "ChainShape:getNextVertex"

(Created page)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
vertex = ChainShape:getNextVertex( )
+
x, y = ChainShape:getNextVertex( )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
{{param|number|x|The x-component of the vertex.}}
+
None.
{{param|number|y|The y-component of the vertex.}}
 
 
=== Returns ===
 
=== Returns ===
Nothing.
+
{{param|number|x (nil)|The x-component of the vertex, or nil if [[ChainShape:setNextVertex]] hasn't been called.}}
 +
{{param|number|y (nil)|The y-component of the vertex, or nil if [[ChainShape:setNextVertex]] hasn't been called.}}
  
 
== See Also ==
 
== See Also ==

Latest revision as of 21:08, 30 October 2016

Available since LÖVE 0.10.2
This function is not supported in earlier versions.

Gets the vertex that establishes a connection to the next shape.

Setting next and previous ChainShape vertices can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape.

Function

Synopsis

x, y = ChainShape:getNextVertex( )

Arguments

None.

Returns

number x (nil)
The x-component of the vertex, or nil if ChainShape:setNextVertex hasn't been called.
number y (nil)
The y-component of the vertex, or nil if ChainShape:setNextVertex hasn't been called.

See Also

Other Languages