R3d.Body:setAngularVelocity: Difference between revisions

From GiderosMobile
m Text replacement - "</source>" to "</syntaxhighlight>"
No edit summary
 
Line 5: Line 5:
Sets the body angular velocity.
Sets the body angular velocity.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
r3d.Body:setAngularVelocity(number)
r3d.Body:setAngularVelocity(avx,avy,avz)
</syntaxhighlight>
</syntaxhighlight>


=== Parameters ===
=== Parameters ===
'''number''': (number) body angular velocity
'''avx''': (number) new body angular x velocity in meters per second<br/>
'''avy''': (number) new body angular y velocity in meters per second<br/>
'''avz''': (number) new body angular z velocity in meters per second<br/>


=== Example ===
=== Example ===
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
player1.body:setAngularVelocity(0, 1, 0)
</syntaxhighlight>
</syntaxhighlight>


{{R3d.Body}}
{{R3d.Body}}

Latest revision as of 09:08, 18 December 2025

Available since: Gideros 2020.2
Class: R3d.Body

Description

Sets the body angular velocity.

r3d.Body:setAngularVelocity(avx,avy,avz)

Parameters

avx: (number) new body angular x velocity in meters per second
avy: (number) new body angular y velocity in meters per second
avz: (number) new body angular z velocity in meters per second

Example

player1.body:setAngularVelocity(0, 1, 0)