pivotjoint

local physics=require("physics") physics.start() physics.setDrawMode( "hybrid" ) physics.setGravity(0,8) local w=display.contentWidth local h=display.contentHeight ---------------------------------------------------- ---------------------------------------------------- local obj1=display.newRect(w/2,h/2,60,60) obj1:setFillColor(1,0,0,0.4) physics.addBody(obj1,"static") local obj2=display.newCircle(w/2-70,h/2-70,30) obj2:setFillColor(0,1,0,1) physics.addBody(obj2,"dynamic",{radius=30}) local pivotJoint=physics.newJoint("pivot",obj2,obj1,w/2,h/2) pivotJoint.isMotorEnabled=true pivotJoint.speedMotor=1000 print(pivotJoint.isMotorEnabled)------showing true in the console------------- pivotJoint.maxMotorTorque=10000

the second object is oscillating but it is not rotating as it should be ,help me out as I can’t find syntantical error.

Sir the object is oscilatt