Physics Apply Force body coordinates

After applying force to a body (think of a projectile), is it possible to track the x and y coordinates of the body’s movement? So that I can utilize those values to visually trace the path to allow users to guide for the subsequent attempts in judging the angle of projection. My main intent is to display the path of the projectile. Thanks in anticipation.

-sanjukris [import]uid: 9730 topic_id: 4321 reply_id: 304321[/import]

just put your moving body in an array and run a check in your main enterFrame game loop.

[lua]local movingBodies = {}

function trackMovingBodies()

for b=1, #movingBodies, 1 do
– do some stuff for each b
end

end

function onEnterFrame(e)

if(#movingBodies > 0) then trackMovingBodies() end

end[/lua] [import]uid: 6645 topic_id: 4321 reply_id: 13458[/import]