Sorry for my english first...
I have problem with creating new GearJoint in my project.
I have two bodyes (body1 and body2), which are connected with GroundBody with help of RevoluteJoint (joint1 and joint2)
I need to constantly rotate first body with help of joint1 motor.
I want to connect joint1 and joint2 with GearJoint, to rotate the second body too.
I create joint, no errors, etc., but second body stay immobile.
Can it caused using of 2.1a version ?
What I do wrong ?
some of the code here:
full code here:
Main
class World
I use the CodeDrive IDE (box2D tests works OK, so I'd not think it issue caused by IDE).
I have problem with creating new GearJoint in my project.
I have two bodyes (body1 and body2), which are connected with GroundBody with help of RevoluteJoint (joint1 and joint2)
I need to constantly rotate first body with help of joint1 motor.
I want to connect joint1 and joint2 with GearJoint, to rotate the second body too.
I create joint, no errors, etc., but second body stay immobile.
Can it caused using of 2.1a version ?
What I do wrong ?
some of the code here:
Code: Select all
var jointGearDef:b2GearJointDef = new b2GearJointDef();
jointGearDef.bodyA = body1;
jointGearDef.bodyB = body2;
jointGearDef.joint1 = joint2;
jointGearDef.joint2 = joint1;
jointGearDef.ratio = 1;
var gearJoint:b2GearJoint = world.CreateJoint(jointGearDef) as b2GearJoint;
full code here:
Main
class World
I use the CodeDrive IDE (box2D tests works OK, so I'd not think it issue caused by IDE).