B2.MouseJoint: Difference between revisions

From GiderosMobile
Created page with "__NOTOC__ '''Supported platforms:''' <br/> '''Available since:''' Gideros 2011.6<br/> === Description === <br /> A mouse joint is used to make a point on a body track a specif..."
 
No edit summary
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:
A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces.<br />
A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces.<br />
<br />
<br />
 
 
 
 
 
 
 
 
 
 
 
 
 
{|-
{|-
| style="width: 50%;"|
| style="width: 50%;"|
=== Methods ===
=== Methods ===
[[b2.MouseJoint:getDampingRatio]] - returns the damping ratio<br/>
[[b2.MouseJoint:getFrequency]] - returns the response frequency in Hertz<br/>
[[b2.MouseJoint:getMaxForce]] - returns the maximum force in N<br/>
[[b2.MouseJoint:getTarget]] - returns the x and y coordinates of the target point<br/>
[[b2.MouseJoint:setDampingRatio]] - sets the damping ratio (0 = no damping, 1 = critical damping)<br/>
[[b2.MouseJoint:setFrequency]] - sets the response frequency in Hertz<br/>
[[b2.MouseJoint:setMaxForce]] - sets the maximum force in N<br/>
[[b2.MouseJoint:setTarget]] - updates the target point<br/>
| style="width: 50%;"|
| style="width: 50%;"|
=== Events ===
=== Events ===
=== Constants ===
=== Constants ===
|}
|}

Revision as of 07:56, 23 August 2018

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

Description


A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces.








Methods

b2.MouseJoint:getDampingRatio - returns the damping ratio
b2.MouseJoint:getFrequency - returns the response frequency in Hertz
b2.MouseJoint:getMaxForce - returns the maximum force in N
b2.MouseJoint:getTarget - returns the x and y coordinates of the target point
b2.MouseJoint:setDampingRatio - sets the damping ratio (0 = no damping, 1 = critical damping)
b2.MouseJoint:setFrequency - sets the response frequency in Hertz
b2.MouseJoint:setMaxForce - sets the maximum force in N
b2.MouseJoint:setTarget - updates the target point

Events

Constants