Difference between revisions of "B2.createGearJointDef"

(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), = b2.createGearJointDef(bodyAbodyBjoint1joint2ratio,)
+
(table) = b2.createGearJointDef(bodyA,bodyB,joint1,joint2,ratio)
 
</source>
 
</source>
'''bodyA:''' (b2.Body) the first attached body ''''''<br/>
+
'''bodyA''': (b2.Body) the first attached body ''''''<br/>
'''bodyB:''' (b2.Body) the second attached body ''''''<br/>
+
'''bodyB''': (b2.Body) the second attached body ''''''<br/>
'''joint1:''' (b2.Joint) the first revolute/prismatic joint attached to the gear joint ''''''<br/>
+
'''joint1''': (b2.Joint) the first revolute/prismatic joint attached to the gear joint ''''''<br/>
'''joint2:''' (b2.Joint) the second revolute/prismatic joint attached to the gear joint ''''''<br/>
+
'''joint2''': (b2.Joint) the second revolute/prismatic joint attached to the gear joint ''''''<br/>
'''ratio:''' (number, default = 1) the gear ratio ''''''<br/>
+
'''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 11: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