Difference between revisions of "B2.createGearJointDef"
From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Creates and returns a gear joint definition table.<br /> (Please refer to b2.World:createJoin...") |
|||
Line 7: | Line 7: | ||
<br /> | <br /> | ||
<source lang="lua"> | <source lang="lua"> | ||
− | (table) | + | (table) = b2.createGearJointDef(bodyA,bodyB,joint1,joint2,ratio) |
</source> | </source> | ||
− | '''bodyA | + | '''bodyA''': (b2.Body) the first attached body ''''''<br/> |
− | '''bodyB | + | '''bodyB''': (b2.Body) the second attached body ''''''<br/> |
− | '''joint1 | + | '''joint1''': (b2.Joint) the first revolute/prismatic joint attached to the gear joint ''''''<br/> |
− | '''joint2 | + | '''joint2''': (b2.Joint) the second revolute/prismatic joint attached to the gear joint ''''''<br/> |
− | '''ratio | + | '''ratio''': (number, default = 1) the gear ratio ''''''<br/> |
'''Returns''' (table) A new gear joint definition table<br/> | '''Returns''' (table) A new gear joint definition table<br/> |
Revision as of 10:17, 23 August 2018
Available since: Gideros 2011.6
Description
Creates and returns a gear joint definition table.
(Please refer to b2.World:createJoint function for more information about all the information needed to create a gear joint).
(table) = b2.createGearJointDef(bodyA,bodyB,joint1,joint2,ratio)
'bodyA: (b2.Body) the first attached body '
'bodyB: (b2.Body) the second attached body '
'joint1: (b2.Joint) the first revolute/prismatic joint attached to the gear joint '
'joint2: (b2.Joint) the second revolute/prismatic joint attached to the gear joint '
'ratio: (number, default = 1) the gear ratio '
Returns (table) A new gear joint definition table