Hi, I got strange results when I create PismaticJoint and then load a force to it (for example by throwing down box onto it).
When the force is loaded, prismatic joint strangely changes its direction. I initialized it to [0,1].
What's wrong?
When the force is loaded, prismatic joint strangely changes its direction. I initialized it to [0,1].
Code:
jpd.Initialize(m_world.GetGroundBody(), objectBody, objectBody.GetWorldCenter(), new b2Vec2(0, 1));
jpd.upperTranslation = 2;
jpd.lowerTranslation = -2;
jpd.enableLimit = true;
jpd.motorSpeed = 0;
jpd.maxMotorForce = 100;
jpd.enableMotor = true;
jp = m_world.CreateJoint(jpd) as b2PrismaticJoint;
jpd.upperTranslation = 2;
jpd.lowerTranslation = -2;
jpd.enableLimit = true;
jpd.motorSpeed = 0;
jpd.maxMotorForce = 100;
jpd.enableMotor = true;
jp = m_world.CreateJoint(jpd) as b2PrismaticJoint;
What's wrong?