FLAG 3.0 GET

Joint

Joints are secondary objects that can be effected by Box2D physics simulations. Actor Bodies can be attached together using Joints. Even Bodies from other Actors can be attached using FLAG.addJoint. Normally, Joints are created using POLE and then manipulated using FLAG and WIND.

Class

FLAGJOINT

Called by FLAG.Actor("myActor").Joint("theJoint")

FLAG.Actor( instanceName:String ).Joint( name:String ); Parameters instanceName:String --- The name of the Actor instance in the Scene name:String --- The name of the Joint created in POLE or by FLAG.addJoint Example
FLAG.Actor("myActor").Joint("theBody");
Extend Class Example
FLAGJOINT.prototype.myFunction = function(){
console.log("I added to the FLAGJOINT Class");
};

Properties

fb2Joint:b2Joint --- A FLAG enhanced Box2D Joint name:String --- Name of the Joint

Methods

Destroy

Removes and Actor's Joint from the Scene.

FLAG.Actor("myActor").Joint("theJoint").destroy( );

Get Anchor A

Uses Box2D to return the first anchor of the Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getAnchorA( );

Get Anchor B

Uses Box2D to return the second anchor of the Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getAnchorB( );

Get Angle

Uses Box2D to return, in degrees, the angle of the Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getAngle( );

Get Body A

Uses Box2D to return the first Body of the Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getBodyA( );

Get Body B

Uses Box2D to return the second Body of the Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getBodyB( );

Get Motor Torque

Uses Box2D to return the torque of the motor on an Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getMotorTorque( );

Get Reaction Force

Uses Box2D to return the reaction force on an Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getReactionForce( );

Get Reaction Torque

Uses Box2D to return the reaction torque on an Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getReactionTorque( );

Get Speed

Uses Box2D to return the speed of an Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").getSpeed( );

Set Max Motor Torque

Set the maximum motor torque of an Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").setMaxMotorTorque( maxTorque:Number ); Parameters maxTorque:Number --- The maximum torque of a motor Example
FLAG.Actor("myActor").Joint("myJoint").setMaxMotorTorque(3);

Set Motor Speed

Set the motor speed of an Actor's Joint.

FLAG.Actor("myActor").Joint("theJoint").setMotorSpeed( speed:Number ); Parameters speed:Number --- The speed of a motor Example
FLAG.Actor("myActor").Joint("myJoint").setMotorSpeed(3);
POLE WIND