Anybody try add Prismatic joint or distance joint of farseer in truesyns

I try code but it doesn't run. May I explain it for me:


public override void OnSyncedStart ()
{
base.OnSyncedStart ();
tsRigidBody2D.useGravity = true;
World world = (World)Physics2DWorldManager.instance.GetWorld();
if(refAnchorObj != null){

TSTransform2D anchorTrans = refAnchorObj.GetComponent ();
Body a = (Body)anchorTrans.tsCollider.Body;
Body b = (Body)tsRigidBody2D.tsCollider.Body;
PrismaticJoint joint = JointFactory.CreatePrismaticJoint (world, a, b,TSVector2.zero,TSVector2.up);
joint.LimitEnabled = true;
joint.SetLimits (-10, 10);
joint.CollideConnected = false;
joint.MotorSpeed = 1000;
joint.MotorEnabled = true;
joint.MaxMotorForce = 1000;
joint.Enabled = true;
}
else{
Debug.Log ("refAnchorObj null;");
}
}
public override void OnSyncedUpdate ()
{
base.OnSyncedUpdate ();
World world = (World)Physics2DWorldManager.instance.GetWorld();
Debug.Log ("world count: "+world.JointList.Count);
}

Comments