Difference between revisions of "B2.World:destroyBody"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 +
'''Class:''' [[b2.World]]<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
Destroys a rigid body.
Destroys a rigid body. This function is locked during callbacks.<br />
+
<syntaxhighlight lang="lua">
<br />
+
b2.World:destroyBody(body)
&lt;ul&gt;<br />
+
</syntaxhighlight>
&lt;li&gt;*Warning:**&lt;/li&gt;<br />
+
 
&lt;/ul&gt;<br />
+
'''Warning:'''
<br />
+
*this function is locked during callbacks
&lt;ul&gt;<br />
+
*this automatically deletes all associated shapes and joints
&lt;li&gt;This automatically deletes all associated shapes and joints.&lt;/li&gt;<br />
+
 
&lt;li&gt;This function is locked during callbacks.&lt;/li&gt;<br />
 
&lt;/ul&gt;<br />
 
<br />
 
<source lang="lua">
 
b2.World:destroyBody(body)
 
</source>
 
 
=== Parameters ===
 
=== Parameters ===
'''body''': (b2.Body) body to be destroyed <br/>
+
'''body''': (b2.Body) body to be destroyed<br/>
 +
 
 +
{{B2.World}}

Latest revision as of 15:27, 13 July 2023

Available since: Gideros 2011.6
Class: b2.World

Description

Destroys a rigid body.

b2.World:destroyBody(body)

Warning:

  • this function is locked during callbacks
  • this automatically deletes all associated shapes and joints

Parameters

body: (b2.Body) body to be destroyed





LiquidFun