is there a way to “go around” the obstacles when using transition?
I am using the following code to move my player object
local movePlayer = function(event)
local distancep = math.sqrt((player.x - event.x) * (player.x - event.x) + (player.y - event.y) * (player.y - event.y))
transition.to(player,{time=distancep * 10, alpha=0, x=event.x, y=event.y,transition = easing.linear} )
end
However, i notice that it will just pass through the obstacle object even though i set the obstacle to “static”
How can i fix this?
Thanks [import]uid: 237763 topic_id: 37428 reply_id: 67428[/import]