Object follow another object ?

 local player local mSqrt = math.sqrt local function distanceBetween( pos1, pos2 ) local factor = { x = pos2.x - pos1.x, y = pos2.y - pos1.y } return mSqrt( ( factor.x \* factor.x ) + ( factor.y \* factor.y ) ) end enemy = display.newRect(200,250,30,30) enemy.speed = .06 player = display.newCircle( 50, 50, 15 ) player.speed = .06 player:setFillColor(0,1,0) local function movePlayer(event) transition.cancel ( player.trans ) local totDist = distanceBetween(player, event) local travTime = totDist / player.speed player.trans = transition.to ( player, {time=travTime, x=event.x, y=event.y} ) end transition.to(enemy,{time=2000,x=player.x,y=player.y}) Runtime:addEventListener("touch", movePlayer) 

How to make the enemy object follow the player object  ?

Like this? 

https://www.youtube.com/watch?v=4uwOSwr_O9U

https://forums.coronalabs.com/topic/56964-multiple-transition-on-the-same-time/

Like this game

https://youtu.be/xWFV_yL0EJY

Spawning enemy on random coordinates and move to the player , when the player move the enemy will follow the player .

The video you showed would use the same math applied over time.

Like this? 

https://www.youtube.com/watch?v=4uwOSwr_O9U

https://forums.coronalabs.com/topic/56964-multiple-transition-on-the-same-time/

Like this game

https://youtu.be/xWFV_yL0EJY

Spawning enemy on random coordinates and move to the player , when the player move the enemy will follow the player .

The video you showed would use the same math applied over time.