Troubles tweening
-
I've followed the tutorials and demo scripts, and successfully tweened objects.
But in my own project tween doesn't work.
i add a tween to A(sprite):
A->addTween(Actor::TweenPosition(Vector2(100,100)), 100);I have also tried:
A->addTween(Sprite::TweenPosition(Vector2(100,100)), 100);but it still didn't tween.
A(Sprite) is a object included in a parent Actor.
The tween is called via an event listener.do you have a URL link that has more details on how to use tween, or any advice on how tweens where/should be created.
Thanks
.
-
it should work out of box without any magic
Maybe you missed global update? Or overriden Update?
-
Thanks for responding,
What do you mean global update/ overriden update?
i'm new to game development, forgive me if i seem a little green.I actually working with the Game Part5 demo, i used it to get started.
so just to confirm i can instantiate a tween from anywhere and it should work?
Also the a dragsprite, and i want the Sprite to snap back to its position on touch up. if i set the position of the sprite it works fine, but if i want to tween the position it doesn't work.
I'm at a bit of a loss, which is a shame.
also, i've also used a on complete call back, which successfully called the function. just no tween.
Thanks
-
SOLVED
Put tweens in Scene object.