Hello,
I try to make multiplayer game.
In the world i have three ball(circleshape). One for kick(kicker) and others for ball. kicker has mousejoint.
If I kick the any ball, other ball must make same motion.
-i use box2d 2.1-
I tried this;
Code:
public class CustomContactListener extends b2ContactListener
{
override public function EndContact(contact:b2Contact):void
{
........
bll2.setLinearVelocity(bll1.getLinearVelocity);
}
}
}
and I tried this;
Code:
public class CustomContactListener extends b2ContactListener
{
override public function PostSolve(contact:b2Contact, impulse:b2ContactImpulse):void {
{
........
bll2.setLinearVelocity(bll1.getLinearVelocity);
}
}
}
but they dont move same. Second ball move less then first. I can't take correct value of Linearvelocity.
Is there any way to take correct value or make something else?