Difference between revisions of "B2.PulleyJoint"

From GiderosMobile
(Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === <br /> The pulley joint is connected to two bodies and two fixed grou...")
 
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Supported platforms:''' <br/>
+
'''Supported platforms:''' android, ios, mac, pc<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
Line 6: Line 6:
 
The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1  ratio * length2 &lt;= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top. <br />
 
The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1  ratio * length2 &lt;= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top. <br />
 
<br />
 
<br />
 +
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 
{|-
 
{|-
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Methods ===
 
=== Methods ===
 +
[[b2.PulleyJoint:getGroundAnchorA]] - returns the x and y coordinates of the first ground anchor<br/>
 +
[[b2.PulleyJoint:getGroundAnchorB]] - returns the x and y coordinates of the second ground anchor<br/>
 +
[[b2.PulleyJoint:getLengthA]] - returns the current length of the segment attached to bodyA<br/>
 +
[[b2.PulleyJoint:getLengthB]] - returns the current length of the segment attached to bodyB<br/>
 +
[[b2.PulleyJoint:getRatio]] - returns the joint ratio<br/>
 
| style="width: 50%;"|
 
| style="width: 50%;"|
 
=== Events ===
 
=== Events ===
 
=== Constants ===
 
=== Constants ===
 
|}
 
|}

Revision as of 08:57, 23 August 2018

Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6

Description


The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on both sides. This is useful to prevent one side of the pulley hitting the top.






Methods

b2.PulleyJoint:getGroundAnchorA - returns the x and y coordinates of the first ground anchor
b2.PulleyJoint:getGroundAnchorB - returns the x and y coordinates of the second ground anchor
b2.PulleyJoint:getLengthA - returns the current length of the segment attached to bodyA
b2.PulleyJoint:getLengthB - returns the current length of the segment attached to bodyB
b2.PulleyJoint:getRatio - returns the joint ratio

Events

Constants