not sure what your looking to do but i did this affect with our logo in the following example.
logo.png is our logo. and logoanchor.png as a 100% transparent PNG i used as a anchor graphic so it wouldnt show up on the screen)
I did this long ago i am sure there are other methods out there. but in this one, all you need to do is add your rope or chain between the anchor and the logo… or object.
[lua] local director = require(“director”) – Director
local physics = require(“physics”)
physics.start()
local function loadmainmenu()
print(“Done”)
end
–local mainmenubackground = display.newImage( “images/mainmenu-bg.png”, 0, 0, true )
local mainmenubackground = display.newImageRect( “images/mainmenu-bg.png”, 960, 1280, true )
mainmenubackground.x = (display.contentWidth/2)
mainmenubackground.y = (display.contentHeight/2)
local logoanchor = display.newImage( “images/logoanchor.png”, display.contentWidth/2, (display.contentHeight/2)-300, true )
physics.addBody( logoanchor,“static”, { density=8, friction=1, bounce=.2, radius=24 } )
if display.contentWidth > 400 then
logo = display.newImage( “images/logo-large.png”, (display.contentWidth/2)-300, (display.contentHeight/2)-123, true )
else
logo = display.newImage( “images/logo.png”, (display.contentWidth/2)-105, (display.contentHeight/2)-37, true )
end
physics.addBody( logo, { density=8, friction=1, bounce=.2, radius=24 } )
local logopivotbottom = physics.newJoint(“pivot”,logoanchor,logo,display.contentWidth/2,(display.contentHeight/2)-300)
logo:applyForce( 4000, 2000, logo.x, logo.y )
logo.linearDamping = 0.1
timer.performWithDelay(7000, loadmainmenu )[/lua] [import]uid: 67604 topic_id: 11552 reply_id: 73593[/import]