- Home /
3D background effects in a 2D game
Is this possible, do the current batch of 2D toolkits support such functionality or would I need to code this all myself? Any hints, tips or advice on how to have create an animated 3D background for a 2D game?
Here is a video of what I am trying to achieve (the effect). The game is Fantavision and it is a 2D game with an animated 3D background (http://youtu.be/LfQNZ-fSLOo?t=51s).
Answer by amphoterik · Jun 24, 2013 at 12:27 PM
Doing this is very simple. Your game will need two cameras. Put all of your 2D elements on a single layer and set a camera to orthogonal and have it view only that layer. Put your 3D stuff on another layer and have a perspective camera see only that layer.
More info on multiple cameras can be found here: http://answers.unity3d.com/questions/195359/when-why-should-i-use-multiple-cameras-for-differe.html
Ok. That is making more sense. I shall have to investigate the use of 2 cameras as this is all new to me.
@patrijs edited the post with some more info and a link.
Answer by KMKxJOEY1 · Jun 24, 2013 at 01:31 AM
Yes you can easily achieve this; Unity is a 3d game engine, so essentially you would make your '3d background' and then all the playable aspects of your 2d game (e.g. the sprites and such) would be constrained to only 2 axis' giving it the arcade feel. Im not sure what you mean by coding this, you really could just make the background and leave it there.
examples? you literally can just drag 3d models into the scene. no coding required i would think. take any 3d model from your assets folder and drag it into your level