transitions issue

Hey,

I’ve created some sort of space game, and I move the ships around using the built-in transition.to method, and added some easing to it.
I’ve just added some black holes to the mess, which means that if a ship gets too close to it, it’ll be pulled inside. So I have this formula which calculates the ship’s new x and y locations, but it turned out that as long as the transition is active, I cannot change the ship’s x and y myself.
Is there someway around it, or will I have to create the movement code myself instead of using transitions?

Thanks! [import]uid: 44037 topic_id: 23012 reply_id: 323012[/import]

There is transition.cancel().

Knowing there are many ways to skin a cat, you might also look into using velocity or impulse pumps to alter the ships location.

But sometimes, for complex, “scripted” behavior, hitting the math is the only viable solution.

Sorry, not as much help as you would like. I’ll have more time soon, but good luck on a tough one. I was going to implement this behavior myself, but ran out of time. I’ll post up if I actually create it. [import]uid: 21331 topic_id: 23012 reply_id: 92027[/import]

Solved with math…
Every time I encounter these issues I have to beat myself up for not listening in high school.
I created my own tween class which handles only movement, and allows multiple forces to be applied. It’s better than using physics, because every object has a clear starting and ending point, while physics just launches stuff away. [import]uid: 44037 topic_id: 23012 reply_id: 92517[/import]

Yep…

would love to see the class :slight_smile:

Wouldn’t a gravity sink object be AwSomE in the physics side!!! hint, hint! [import]uid: 21331 topic_id: 23012 reply_id: 92590[/import]

I may upload it once I verify that everything is working correctly… there are still some minor bugs here and there.
And I have already implemented a gravity-well, which works pretty nicely… sucking ships in like a mother. [import]uid: 44037 topic_id: 23012 reply_id: 92593[/import]