hey,
i have a little problem (again)
basically, I'm using a motor joint to act as a shock absorber and a spring. My problem is though that the rear wheel is not fixed to the chassis the way I'd want it to be. An example will explain my problem a lot better.
so Here is the SWF
and code
thanks for the read
i have a little problem (again)
basically, I'm using a motor joint to act as a shock absorber and a spring. My problem is though that the rear wheel is not fixed to the chassis the way I'd want it to be. An example will explain my problem a lot better.
so Here is the SWF
and code
Code:
var swingArmJointDef:b2RevoluteJointDef = new b2RevoluteJointDef ()
swingArmJointDef.Initialize (chassis, swingArm, chassis.GetPosition())
swingArmJointDef.enableLimit = true
swingArmJointDef.lowerAngle = 0
swingArmJointDef.upperAngle = 30 * (Math.PI / 180)
swingArmJointDef.maxMotorTorque = 30
swingArmJointDef.enableMotor = true
swingArmJoint = Vals._world.CreateJoint (swingArmJointDef) as b2RevoluteJoint
swingArmJoint.SetMotorSpeed (-5)
swingArmJointDef.Initialize (chassis, swingArm, chassis.GetPosition())
swingArmJointDef.enableLimit = true
swingArmJointDef.lowerAngle = 0
swingArmJointDef.upperAngle = 30 * (Math.PI / 180)
swingArmJointDef.maxMotorTorque = 30
swingArmJointDef.enableMotor = true
swingArmJoint = Vals._world.CreateJoint (swingArmJointDef) as b2RevoluteJoint
swingArmJoint.SetMotorSpeed (-5)
thanks for the read