2D Toolkit Forum
2D Toolkit => Support => Topic started by: mblazek on April 23, 2014, 06:05:22 pm
-
I have a texture that remains the same but the position should change through an animation. Is there a way to do this with 2dToolkit?
Thanks.
-
No there isn't. This has been requested in the past and is in the roadmap trello, but has only had one vote so far.
https://trello.com/c/kSRYYw18/35-offsets-for-individual-frames-of-animation-in-animation-editor
Please vote for it if you'd like to see it.
-
Voted it up!
In the meantime how would you suggest I go about doing it myself?
-
Its not going to be particularly straightforward. The main thing is to add support for position in the sprite itself. This will have to be done similarly to how the scale property works, regenerating the geometry whenever this value changes, appropriately offsetting the sprite mesh.
If you can get that working it should be straightforward enough to patch the animation editor to animate this property.