Now to add a background that is not just a black void, which while space is it is not very interesting for a game world. Click on the player in the hierachy and deselect or uncheck the box next to the player in the inspector just so that it is not in the way.
Then create 3D object, quad and rename it to Background, using the scene view so that it is visable and reset its transform and set its rotation X-axis to 90 this will make it visible in the game view though it is not necessary to use that view at the moment stick with scene view and remove the quads mesh collider component as it is not required. now it needs a texture, now to scale up the quad by changing the scale X-axis to 21 and Y-axis to 21 so that it fits into the game view nicely, if you were using a texture with an image resolution of 1024x2048 you would want to have the scale X be half of the Y-axis so an example would be X 15 and Y 30 to make sure the image does not become blurry.
Next to add some lighting to the background, well sort instead of using a direct lighting source change the shader of the texture on the quad to unlit/texture this will remove all lighting from it and make it look exactly like the original image. now change the position Y-axis to -10 so that it does not clip through the player ship.
Then create 3D object, quad and rename it to Background, using the scene view so that it is visable and reset its transform and set its rotation X-axis to 90 this will make it visible in the game view though it is not necessary to use that view at the moment stick with scene view and remove the quads mesh collider component as it is not required. now it needs a texture, now to scale up the quad by changing the scale X-axis to 21 and Y-axis to 21 so that it fits into the game view nicely, if you were using a texture with an image resolution of 1024x2048 you would want to have the scale X be half of the Y-axis so an example would be X 15 and Y 30 to make sure the image does not become blurry.
Next to add some lighting to the background, well sort instead of using a direct lighting source change the shader of the texture on the quad to unlit/texture this will remove all lighting from it and make it look exactly like the original image. now change the position Y-axis to -10 so that it does not clip through the player ship.
Comments
Post a Comment