1

I want to create a catapult fixed to the ground beacause i will rotate it later using mouse joint this is my code to fix catapult_arm to the ground

{

var revJointDef = new Box2D.Dynamics.Joints.b2RevoluteJointDef;

revJointDef.Initialize(ground,catapult,b2Vec2(catapult_height,ground_height));  

revJointDef.enableMotor = true;    

revJointDef.enableLimit = true;   

revJointDef.motorSpeed  = -1260;    

revJointDef.lowerAngle  = 0.15;    

revJointDef.upperAngle  = 1.30;   

revJointDef.maxMotorTorque = 4800;

the problam is the hinge point , I think b2Vec2(catapult_height,ground_height) is false , what should I put as params ?

Mohamed Omezzine
  • 1,074
  • 3
  • 15
  • 28

0 Answers0