I don’t see any difference in operation, but for the sake of being nice to the physics engine, you can try this instead:
local physics = require("physics")
physics.start()
--Set Background
background = display.newRect( 0, 0, display.contentWidth, display.contentHeight )
background:setFillColor( 255, 255, 255, 255 )
local circle = display.newCircle( 125, 200, 100 )
circle:setFillColor( 0, 0, 255, 255 )
physics.addBody( circle, "kinematic")
local block = display.newRect(circle.x,circle.y,50,50)
block.x = circle.x + 100
block.y = circle.y
block.rotation = 45
block:setFillColor( 0, 0, 0, 255 )
physics.addBody( block, "dynamic")
myJoint = physics.newJoint( "weld", circle, block, block.x, block.y )
circle.angularVelocity = 10
Note: You will need to add the button yourself, but you can alter the angular properties of the circle to get your desired effect. Also I’ll point out that I changed the circle to “kinematic” instead of “static”, this allows us to apply forces without the circle being affected by gravity and collisions. [import]uid: 36054 topic_id: 8040 reply_id: 29753[/import]
