There is a lot of posts about Unity 2D possibilities, but none of them totally answered my question. So I ask it (and hope I wont bother asking an already asked question!).
Is it possible to have real (old) 2D Sprites in Unity? By “real 2D sprites” I mean sprite plane that is always perpendicular to the axis emanating from the camera (those that can only be viewed from the same angle) and not texture mapped sprites.
And if it’s possible, does Unity has a convenient way of managing sprites animations and multiple angles (4 or 8 directions) depending on the position of the camera? (you know, like the doom-like did a long time ago).
Thank you in advance for your reply,
Adrien (unity newcomer)
Also with guitexture, but I think you’ll mostly get advantage by using a ortho camera setting and pointing right down the Y axis for example.
Then you lay your sprites on 3d planes , but because you are in ortho mode they will show up as 2dsprites.
You can even control which sprite gets on top of which one with the Y depth of the plane and you can of course use very cheap and powerfull transparency and rotation of sprites in high quality using this technique.
They have to be texture mapped; however you can have them always directly facing the camera…there’s a script on the wiki for that.
You can put all the animation frames in one texture, and then use tiling and offset to set which frame you want. Some relatively simple scripting would take care of that.
Well I’m not sure about using an orthographic camera as EducaSoft was saying (or maybe I didn’t get it right?) because in my case I want to have 2D sprites for characters in a 3D environement with eventually some camera rotations (but that’s my fault, I should have explained my needs in the first post). Still, it’s interesting and useful maybe I could use that in some level of the game.
So, they have to be texture mapped on plane.
I’m going to search the wiki for the “always facing camera” script!
Maybe I’ll find something about multiple character directions (like 8 ways) relative to the camera position around there.
I take it you’re trying to go for the Super Nintendo’s Mode 7 look? In that case, because you will be using perspective, you would need to use textures as sprites anyway. I think the most versatile solution would be to use camera-facing billboards in combination with your own sprite displaying script. For this I would recommend using the offset and tiling values in the Material class.
Make a basic sprite-displaying script that allows you to give it a texture and tell it how many sprites are in the X and Y directions. Then make scripts for characters that pass sprite indices based on viewing angle. It should all be fairly simple, with a bit of arithmetic for the index → offset calculations.
Exactly!
Like Super Mario Kart or F-Zero. All Vehicles are 2D sprites but with multiple directions/angles, moving on a 3D and texture mapped plane.
Thank you for the advices and the links (I couldn’t find that article on the wiki… don’t understand why)!
I’m going to try this as soon as I understand it entierely (okay I’m new on Unity!).*
I love the irony here…the only reason they used sprites is because 3D with any detail was impossible back then, and now that it’s trivial to do real 3D stuff with Unity, people make some extra effort to recreate the old technique. :lol: