I’ve looked through the info, but can’t find anything regarding this. The easing functions deal with acceleration, but I want an object to go from A to B in something other than a straight line using transform.to. Is that possible? And on a related note, what does the delta parameter do in transition.to? [import]uid: 10835 topic_id: 3404 reply_id: 303404[/import]
Hi Igancio,
off the top of my head, I am not 100%, but this is my take on how I would try this.
I would make use of the onComplete functionality to make the object move in a trajectory movement. It would require the function onComplete to recursively call itself in small increments till the trajectory path ends.
This is just a thought, maybe I will try it out too.
cheers,
Jayant C Varma [import]uid: 3826 topic_id: 3404 reply_id: 10409[/import]
IgnacioIturra,
the delta parameter means…
if set to true, then the given parameters are taken as relative to the starting ones.
[lua]myObj = display.newCircle( 100, 100, 5 )
myObj:setFillColor(255,0,0,255)
transition.to(myObj,{time=500, x = 200,y = 200 })
–After the transition ends, the object is located at x=200, y=200
myObj2 = display.newCircle( 100, 100, 5 )
myObj2:setFillColor(255,255,0,255)
transition.to(myObj2,{time=500, x = 200,y = 200, delta=true })
–After the transition ends, myObj2 is located at x=300, y=300
[lua] [import]uid: 5712 topic_id: 3404 reply_id: 10416[/import]