local cr1 = display.newRect( result, 0, 0, 50, 50) cr1.x = 450 ; cr1.y = 100 physics.addBody(cr1,"static", {density = 5, friction = 0.5, bounce = 0.5}) local cr2 = display.newRect( result, 0, 0, 50, 50) cr2.x = 450 ; cr2.y = 200 physics.addBody(cr2,"dynamic", {density = 5, friction = 0.5, bounce = 0.5}) local myJoint = physics.newJoint("wheel",cr1, cr2, cr2.x, cr2.y,0,20 ) -- x,y is center of rotation cr2:addEventListener("touch", dragBody) myJoint.isMotorEnabled = true --boolean myJoint.motorSpeed = -10000 --not have any effect myJoint.maxMotorForce = 10000 --not have any effect --myJoint.motorForce --read-only --myJoint.isLimitEnabled = true -- dont have --myJoint:setLimits( 0, 20 ) -- dont have --print( myJoint:getLimits() ) -- dont have --myJoint.jointTranslation --read-only; linear value in pixels --myJoint.jointSpeed --read-only; value in pixels per second
as comment in code , it seem corona document is lack here ?or I doing it worng somewhere ?