- Home /
Different Views of 2D Sprites
Hi! I am trying to make games in Unity using sprites. I have been working on a few test projects, with sprites and billboards, but how is it possible to make sprites that you can view from different angles? Say I have a person sprite, and I walk about them - how can I make it so that I see the front, back, and sides of that sprite? Is it some kind of animation? Notch did it in his game Shambles - shambles.notch.net. That is what I am basing this question off of. And also - I dunno if it it against the rules to ask to different questions, but - how do you think Notch made that pixelated shader? Could someone point me in the right direction to do something like that?
Thanks.
Answer by robertbu · Aug 24, 2013 at 11:28 PM
The sprite is always facing the camera, or at least parallel to the plane of the camera. He has a sprite set (3 to 5 images) for each of four directions of travel, forward, back, left, right. As the sprite changes directions, he changes the set of sprites he is animating.
The efficient way to do this is with a texture atlas, but you can get up and running with existing scripts. For example this script from the Wiki should be a good start:
http://wiki.unity3d.com/index.php/Animating_Tiled_texture_-_Extended