Or is this an impossible topic to answer? I have seen mayobutters comment about creating a distance joint however when I'm trying to do the same it gives me errors and create two joints where they are suppose to be but with no connector.
Code:
var objectA:Ball = e.relatedObject as Ball;
var objectB:BoxMan = e.target as BoxMan;
if (objectA) {
var j:Joint = new Joint();
var j2:Joint = new Joint();
j.type = 'Distance';
j.x = objectB.body.x;
j.y = objectB.body.y;
j2.x = objectA.body.x;
j2.y = objectA.body.y;
j.targetObject1 = objectB.body;
j.targetObject2 = j2;
j2.targetObject1 = objectA.body;
j.connectorClassName = 'ConnectorDots';
this.addChild(j2);
this.addChild(j);
I am new to this and I have learnt so much in these three months but i would really like to finish my school project soon, so please help me!
Thank you in advance
