How can I put 2d sprites in a 3d world?
#1 Members - Reputation: 208
Posted 30 September 2012 - 11:02 AM
I haven't started with Unity to much, but I have made games before with a 2d engine and understand the logic behind coding. I know some java and javascript.
How can I achieve this in Unity?
#2 GDNet+ - Reputation: 1547
Posted 01 October 2012 - 01:17 AM
Make a plane like this:

Then add a texture which is your 2D sprite, and you're done!
OpenChess - 1.0 done!
Classic RPG #1 - Task 9 -> January 1st 2013
#3 Members - Reputation: 841
Posted 01 October 2012 - 02:37 AM
Unity Wiki page about billboard: http://wiki.unity3d.com/index.php?title=CameraFacingBillboard
First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/
#4 Members - Reputation: 208
Posted 01 October 2012 - 01:28 PM
When you say build boarding is for textures and UI that makes me think when I try buildboarding with a character it won't animate. Is that true?The correct term to use/search for help is "billboard". I.e. you create a rectangle, apply texture and keep it always faced to camera. Normally this is used for things like UI elements (think about health bar above character's head), particles (sparks, smoke, fire) etc. but you can use it for sprites as well. More advanced billboarding uses vertex shader, but for simpler cases you can just modify the transformation of your rectangle object every frame.
Unity Wiki page about billboard: http://wiki.unity3d....FacingBillboard
#5 Members - Reputation: 1006
Posted 01 October 2012 - 03:17 PM
There are various things in the Unity forums about it, e.g.:
http://answers.unity3d.com/questions/26770/prefab-billboard-with-a-transparency-texture.html
http://forum.unity3d.com/threads/1093-Importing-Image-Sequence-W-Alpha-Animated-Billboard-Texture
#7 Members - Reputation: 210
Posted 01 October 2012 - 09:13 PM
In addition to the billboarding that has been mentioned, you could use a materials mainTextureOffset to step through a sprite sheet.
The following is very a quick an example I found on youtube demonstrating this.
http://www.youtube.com/watch?v=igxi8d2f5bc
You could build a sprite sheet with multiple rows of animations such as: idle, walking, jumping, falling, dying, etc.
On another note, I happened to run across this interesting article some time back, a tech review of MikaMobile's Zombieville USA. I thought it was kind of neat how they used Coral Paint to create the images, then used Maya for the animation of textured planes.






