Difference between revisions of "B2.FrictionJoint"
From GiderosMobile
Line 38: | Line 38: | ||
---- | ---- | ||
+ | *'''[[B2.Joint]]''' | ||
*'''[[LiquidFun]]''' | *'''[[LiquidFun]]''' |
Revision as of 15:09, 18 February 2020
Supported platforms:
Available since: Gideros 2011.6
Inherits from: b2.Joint
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 |