physics.addBody(leftTire, "dynamic", {density=15, friction=1, bounce=.5, radius=30}) physics.addBody(rightTire, "dynamic", {density=15, friction=1, bounce=.5, radius=30}) physics.addBody(truck, physicsData:get("truck") ) leftTireJoint = physics.newJoint("wheel", truck, leftTire, leftTire.x, leftTire.y, 0, 50) rightTireJoint = physics.newJoint("wheel", truck, rightTire, rightTire.x, rightTire.y, 0, 50) leftTireJoint.isMotorEnabled = true leftTireJoint.motorSpeed = 5000000
I created a truck and 2 tires. The tires use a wheel joint and everything seems to look and work correctly as far as the joints. However no matter what I do I can’t get the wheels to spin using the motorSpeed. If I set the truck on an incline it will roll just fine but I can’t seem to power it. Any ideas?
Thanks