local physics = require(“physics”);
local myRect = display.newRect( 0, 0, 100, 100 )
myRect.x=100;
myRect.y=100;
physics.addBody( myRect, “dynamic” )
myRect:applyTorque( 100 )
error:attempt to call a method ’ apply torque’(a nil value)
local physics = require(“physics”);
local myRect = display.newRect( 0, 0, 100, 100 )
myRect.x=100;
myRect.y=100;
physics.addBody( myRect, “dynamic” )
myRect:applyTorque( 100 )
error:attempt to call a method ’ apply torque’(a nil value)
Can you copy and paste the exact error out of the Corona Console log window please?
Thanks
Rob
yeah…i can attach the image
Ah… You need to start physics. After the line where you “require” physics, do:
physics.start()
Rob
thanks rob
Can you copy and paste the exact error out of the Corona Console log window please?
Thanks
Rob
yeah…i can attach the image
Ah… You need to start physics. After the line where you “require” physics, do:
physics.start()
Rob
thanks rob