Game Development Reference
In-Depth Information
Assign the Skybox faces to a new layer, SkyBoxLayer , select the first-person
controller camera, and then change the Culling Mask field to exclude the
SkyBoxLayer layer. The first-person camera should render only foreground objects
and not background ones. To achieve this, change the Clear Flags field to Depth
only in the Object Inspector, as shown in the following screenshot. This renders
the camera background to transparent, which allows lower-order cameras to show
through, if any.
Making the camera background transparent
Now, create a new and additional Camera object as a direct child object of the
first-person camera and match its position, rotation, and scale. This allows the
camera to inherit all the transformations from the first-person camera. The purpose
of the secondary camera is to render only the Skybox object as a layer beneath the
first-person camera while matching the first-person position and rotation.
 
Search WWH ::




Custom Search