2D Toolkit Forum
2D Toolkit => Support => Topic started by: Kieranb on April 30, 2014, 05:26:14 am
-
Hi there,
Just wondering if it's possible to skew a sprite at run time, so that the top half moves while the bottom half stays put.
-
No it isn't.
-
Ah Ok thanks. Love 2D Toolkit, first feature I've ever come across that hasn't been implemented already.
Keep being awesome!
-
Set the anchor to Lower Center and change it's Scale Y.... I think this will give you what you want.
-
I think it would also be good to implement a skew for the tk2d textmesh as well. It would be good to create "italic" on the fly :)
I generally work around this by rotating the text/sprite in two axes. Works for 2d games --- 3d rotation becomes 2d skew from the point of view of the camera.
-
I've done skewing by changing the mesh's vertices, it may break the batching but not sure about that. I think I also had to change some of the tk2d code to access the vertices array too.