https://wiki.multitheftauto.com/wiki/PhysicsApplyDamping?feed=atom&action=history
PhysicsApplyDamping - Revision history
2024-03-29T14:02:53Z
Revision history for this page on the wiki
MediaWiki 1.39.3
https://wiki.multitheftauto.com/index.php?title=PhysicsApplyDamping&diff=65155&oldid=prev
CrosRoad95: Created page with "__NOTOC__ {{Client function}} Slows down rigid body ==Syntax== <syntaxhighlight lang="lua"> bool physicsApplyDamping( physics-rigid-body theRigidBody, float dumping)..."
2020-02-14T15:11:46Z
<p>Created page with "__NOTOC__ {{Client function}} Slows down rigid body ==Syntax== <syntaxhighlight lang="lua"> bool physicsApplyDamping( physics-rigid-body theRigidBody, float dumping)..."</p>
<p><b>New page</b></p><div>__NOTOC__ <br />
{{Client function}}<br />
Slows down rigid body<br />
<br />
==Syntax== <br />
<syntaxhighlight lang="lua"><br />
bool physicsApplyDamping( physics-rigid-body theRigidBody, float dumping) <br />
</syntaxhighlight> <br />
<br />
===Required Arguments=== <br />
*'''theRigidBody:''' rigid body you want to apply velocity<br />
*'''dumping:''' how much rigid body must slow down, if negative value, effect will inverted, make it speed up<br />
<br />
===Returns===<br />
True if angular velocity got applied, false otherwise.<br />
<br />
==Example==<br />
<br />
After threee seconds make box rapidly slow down falling<br />
<syntaxhighlight lang="lua"><br />
local box = physicsCreateShape(physics, "box", 1)<br />
local boxrb = physicsCreateRigidBody(box)<br />
physicsSetProperties(boxrb, "position", 0,0,100)<br />
<br />
setTimer(function()<br />
physicsApplyDamping(boxrb, 10000)<br />
end,3000,1)<br />
</syntaxhighlight><br />
<br />
==See Also==<br />
<br />
{{Client_physics_functions}}</div>
CrosRoad95