Getting angle from transition?

Is it possible to get the angle from an active transition (object)?

I have some objects moving on screen and I want to calculate a point in front of their movement, so I need their angle. The idea is to shoot at this objects and because of their movement I have to target a point in front of the objects themselves.

Any help on this welcome!

sure, just interrogate the value whenever you need it, fe:

local obj = display.newRect(100,100,10,10) transition.to(obj, { time=5000, rotation=360 }) timer.performWithDelay(100, function() print(obj.rotation) end, -1)

your usage may be different of course, this just to “prove” that you can read a transitioning value whenever you want

sure, just interrogate the value whenever you need it, fe:

local obj = display.newRect(100,100,10,10) transition.to(obj, { time=5000, rotation=360 }) timer.performWithDelay(100, function() print(obj.rotation) end, -1)

your usage may be different of course, this just to “prove” that you can read a transitioning value whenever you want