|
Moai SDK
1.5 revision 1 (MoaiEdition)
|
Inherits MOAILuaObject, and MOAICpPrim.
Returns the current bias coefficient.
function getBiasCoef ( MOAICpConstraint self )
| self | ( MOAICpConstraint ) |
Returns the maximum bias coefficient.
function getMaxBias ( MOAICpConstraint self )
| self | ( MOAICpConstraint ) |
Returns the maximum force allowed.
function getMaxForce ( MOAICpConstraint self )
| self | ( MOAICpConstraint ) |
Creates a new damped rotary string between the two specified bodies.
function newDampedRotarySpring ( MOAICpBody first, MOAICpBody second, number restAngle, number stiffness, number damping )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| restAngle | ( number ) The angle at which the spring is at rest. |
| stiffness | ( number ) The stiffness of the spring. |
| damping | ( number ) The damping applied to the spring. |
Creates a new damped string between the two specified bodies.
function newDampedSpring ( MOAICpBody first, MOAICpBody second, number x1, number y1, number x2, number y2, number restAngle, number stiffness, number damping )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| x1 | ( number ) The X position of the first anchor. |
| y1 | ( number ) The Y position of the first anchor. |
| x2 | ( number ) The X position of the second anchor. |
| y2 | ( number ) The Y position of the second anchor. |
| restAngle | ( number ) The angle at which the spring is at rest. |
| stiffness | ( number ) The stiffness of the spring. |
| damping | ( number ) The damping applied to the spring. |
Creates a new gear joint between the two specified bodies.
function newGearJoint ( MOAICpBody first, MOAICpBody second, number phase, number ratio )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| phase | ( number ) The phase of the gear. |
| ratio | ( number ) The gear ratio. |
Creates a new groove joint between the two specified bodies.
function newGrooveJoint ( MOAICpBody first, MOAICpBody second, number gx1, number gy1, number gx2, number gy2, number ax, number ay )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| gx1 | ( number ) |
| gy1 | ( number ) |
| gx2 | ( number ) |
| gy2 | ( number ) |
| ax | ( number ) |
| ay | ( number ) |
Creates a new pin joint between the two specified bodies.
function newPinJoint ( MOAICpBody first, MOAICpBody second, number ax1, number ay1, number ax2, number ay2 )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| ax1 | ( number ) |
| ay1 | ( number ) |
| ax2 | ( number ) |
| ay2 | ( number ) |
Creates a new pivot joint between the two specified bodies.
function newPivotJoint ( MOAICpBody first, MOAICpBody second, number x, number y [, number ax, number ay ] )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| x | ( number ) |
| y | ( number ) |
| ax | ( number ) Optional. |
| ay | ( number ) Optional. |
Creates a new ratchet joint between the two specified bodies.
function newRatchetJoint ( MOAICpBody first, MOAICpBody second, number phase, number ratchet )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| phase | ( number ) The phase of the gear. |
| ratchet | ( number ) The ratchet value. |
Creates a new rotary limit joint between the two specified bodies.
function newRotaryLimitJoint ( MOAICpBody first, MOAICpBody second, number min, number max )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| min | ( number ) The minimum rotary value. |
| max | ( number ) The maximum rotary value. |
Creates a new simple motor joint between the two specified bodies.
function newSimpleMotor ( MOAICpBody first, MOAICpBody second, number rate )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| rate | ( number ) The rotation rate of the simple motor. |
Creates a new slide joint between the two specified bodies.
function newSlideJoint ( MOAICpBody first, MOAICpBody second, number ax1, number ay1, number ax2, number ay2, number min, number max )
| first | ( MOAICpBody ) |
| second | ( MOAICpBody ) |
| ax1 | ( number ) |
| ay1 | ( number ) |
| ax2 | ( number ) |
| ay2 | ( number ) |
| min | ( number ) |
| max | ( number ) |
Sets the current bias coefficient.
function setBiasCoef ( MOAICpConstraint self, number bias )
| self | ( MOAICpConstraint ) |
| bias | ( number ) The bias coefficient. |
Sets the maximum bias coefficient.
function setMaxBias ( MOAICpConstraint self, number bias )
| self | ( MOAICpConstraint ) |
| bias | ( number ) The maximum bias coefficient. |
Sets the maximum force allowed.
function setMaxForce ( MOAICpConstraint self, number bias )
| self | ( MOAICpConstraint ) |
| bias | ( number ) The maximum force allowed. |