how can i make an object return in his original position with the “bounce”?
this is the code that i wrote:
local physics = require( “physics” )
physics.start()
local bg=display.newImage(“background.jpg”)
local w,h=display.contentWidth, display.contentHeight
local ret=display.newRect(0,0,75,75)
local latSx=display.newRect(325,0,10,200)
transition.to(ret,{time=600,x=(w),})
physics.addBody(latSx,“static”,{bounce=1.0})
physics.addBody(ret,{bounce=1.0})