need help to convert transition.to function in physics simulation

guys i am stucked (again second time in this week!! may be going to break the record for this) :slight_smile:

may be the title is not perfect for my problem but i cant think another title

here’s the code with transition

[lua]local rect = display.newRect(0,0,50,50)
local rect1 = display.newRect(380,270,50,50)

function call1()
transition.to(rect,{time = 1000,y = 200})
transition.to(rect1,{time = 1000,y = 150,onComplete = call2})
end

function call2()
transition.to(rect,{time = 1000,y = 25})
transition.to(rect1,{time = 1000,y = 320-25,onComplete = call1})
end

call1()[/lua]

i want this same effect with gravity as i need physics simulation for this and also collition.

in short i need two gravity for two different object to apply which is not possible so any other idea to achieve this much appreciated

:slight_smile: [import]uid: 12482 topic_id: 17845 reply_id: 317845[/import]

solved :slight_smile:

with this article

http://www.emanueleferonato.com/2009/07/17/managing-multiple-gravities-with-box2d/

[import]uid: 12482 topic_id: 17845 reply_id: 68141[/import]