The term you’re thinking of is momentum.
Try doing some searches on that.
As far as angle, you need to accumulate points to form a vector and then calculate a vector from the last two points.
Something like ( may contain typos; and requires SSK2 because I’m not doing long hand vector math)…
local getTimer = system.getTimer local momentumTime = 500 local cap = 500 -- Uses SSK2 Math2D: -- https://roaminggamer.github.io/RGDocs/pages/SSK2/libraries/math2D/ -- local function onTouch( self, event ) self.x = event.x -- NOT BEST WAY TO DO THIS self.y = event.y -- NOT BEST WAY TO DO THIS if( event.phase == "began" ) then self.touches = {} transition.cancel(self) elseif( event.phase == "moved" ) then self.touches[#self.touches+1] = { x = event.x, y = event.y, t = getTimer() } elseif(event.phase == "ended" ) then if( #self.touches \>= 4 ) then local p0 = self.touches[#self.touches-3] local p1 = self.touches[#self.touches] local vec = ssk.math2d.sub( p1, p0 ) local len = ssk.math2d.length( vec ) if( len \> 1 ) then local dt = p1.t - p0.t -- NOT BEST WAY BUT WILL WORK OK... local speed = 1000 \* len/dt if( speed \> cap ) then speed = cap end local distance = momentumTime \* speed / 1000 vec = ssk.math2d.normalize( vec ) vec = ssk.math2d.scale( vec, distance ) vec.x = vec.x + self.x vec.y = vec.y + self.y transition.to( self, { x = vec.x, y = vec.y, time = momentumTime, transition = easing.outCirc } ) end end end return false end local obj = display.newRect( 100, 100, 100, 100 ) obj.touch = onTouch obj:addEventListener("touch")