Difference between revisions of "B2.FrictionJoint"
From GiderosMobile
Line 2: | Line 2: | ||
'''Supported platforms:''' android, ios, mac, pc<br/> | '''Supported platforms:''' android, ios, mac, pc<br/> | ||
'''Available since:''' Gideros 2011.6<br/> | '''Available since:''' Gideros 2011.6<br/> | ||
− | === Description === | + | === <translate>Description</translate> === |
<translate><br /> | <translate><br /> | ||
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. <br /> | Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. <br /> | ||
<br /></translate> | <br /></translate> | ||
− | === Examples === | + | === <translate>Examples</translate> === |
'''Friction joint'''<br/> | '''Friction joint'''<br/> | ||
<source lang="lua">--create empty box2d body for joint | <source lang="lua">--create empty box2d body for joint | ||
Line 20: | Line 20: | ||
{|- | {|- | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === Methods === | + | === <translate>Methods</translate> === |
[[Special:MyLanguage/b2.FrictionJoint:getMaxForce|b2.FrictionJoint:getMaxForce]] ''<translate>returns the maximum friction force in N</translate>''<br/> | [[Special:MyLanguage/b2.FrictionJoint:getMaxForce|b2.FrictionJoint:getMaxForce]] ''<translate>returns the maximum friction force in N</translate>''<br/> | ||
[[Special:MyLanguage/b2.FrictionJoint:getMaxTorque|b2.FrictionJoint:getMaxTorque]] ''<translate>returns the maximum friction torque in N*m</translate>''<br/> | [[Special:MyLanguage/b2.FrictionJoint:getMaxTorque|b2.FrictionJoint:getMaxTorque]] ''<translate>returns the maximum friction torque in N*m</translate>''<br/> | ||
Line 26: | Line 26: | ||
[[Special:MyLanguage/b2.FrictionJoint:setMaxTorque|b2.FrictionJoint:setMaxTorque]] ''<translate>sets the maximum friction torque in N*m</translate>''<br/> | [[Special:MyLanguage/b2.FrictionJoint:setMaxTorque|b2.FrictionJoint:setMaxTorque]] ''<translate>sets the maximum friction torque in N*m</translate>''<br/> | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === Events === | + | === <translate>Events</translate> === |
− | === Constants === | + | === <translate>Constants</translate> === |
|} | |} |
Revision as of 07:28, 24 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6
Description
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
Examples
Friction joint
--create empty box2d body for joint
local ground = world:createBody({})
ground:setPosition(350, 480)
--create friction joint
local jointDef = b2.createFrictionJointDef(body, ground, 350, 200)
local frictionJoint = world:createJoint(jointDef)
--set maximum friction force to slow down the ball
frictionJoint:setMaxForce(100)
Methodsb2.FrictionJoint:getMaxForce returns the maximum friction force in N |
EventsConstants |