Create 2 instance variables on the object called something like PreviousX and PreviousY
On start of layout
--- Set Object.PreviousX to Object.X
--- Set Object.PreviousY to Object.Y
Every tick
--- Angle of Motion = angle(Object.PreviousX, Object.PreviousY, Object.X, Object.Y)
--- Set Object.PreviousX to Object.X
--- Set Object.PreviousY to Object.Y