I think I am using applyTorque wrong and I can not find any examples on the web. Here is the code I have:
[lua]------------------------------------------
– NEWPADDLEWHEEL FUNCTION
function newPaddleWheel(x,y)
local paddleWheel = display.newImage(“sprites/paddleWheel.png”, x, y)
–paddleWheel:setReferencePoint(display.TopLeftReferencePoint)
local part1 = {-25,30,-30,24,25,-30,30,-25}
local part2 = {30,25,24,30,-30,-25,-25,-30}
local part3 = {-4,39,-4,-39,4,-39,4,39}
local part4 = {-39,4,-39,-4,39,-4,39,4}
local body = physics.addBody(paddleWheel, “kinematic”,
{ density = 1.0, friction = 0.3, bounce = 0.2 , shape = part1},
{ density = 1.0, friction = 0.3, bounce = 0.2 , shape = part2},
{ density = 1.0, friction = 0.3, bounce = 0.2 , shape = part3},
{ density = 1.0, friction = 0.3, bounce = 0.2 , shape = part4}
)
body:applyTorque(200)
end[/lua]
I am trying to make it rotate around its center of mass when another physics body hits it. So far it just doesnt do anything when another body hits it. Any help is greatly appreciated, thanks. [import]uid: 9484 topic_id: 17663 reply_id: 317663[/import]
[import]uid: 52491 topic_id: 17663 reply_id: 67239[/import]