Setting the mood

It's great to be able to see our scene in action, but the harsh lighting and grey walls don't really fit our zombie theme. We can correct that with a few materials and a new lighting setup:

  1. Right-click in the Project panel and create two new materials.
  2. Rename the materials Ground and Walls.
  3. Set the color for both materials. Use darker colors for both, but the walls should be a bit brighter. We used hex values #514735FF for the Ground and #65615AFF for the Walls.
Unity uses 4 pairs of hexadecimal values to specify color. The format for these values is #RRGGBBAA, where RR (red), GG (green), BB (blue) and AA (Alpha) are hexadecimal integers between 00 and FF specifying the intensity of the color.
For example, #FF800000 is displayed as bright orange, because the red component is set to its highest value (FF), the green is set to a medium value (80), and the others are set to 00.
When creating transparent colors, set the AA (Alpha) to a value less than FF and the material's Render Mode to Transparent.
  1. Use the Inspector to set the Smoothness to 0 and turn off the Specular Highlights for both materials. Add the new materials to the Materials folder and apply the Ground and Walls materials to the respective objects.
  2. Choose Spotlight from the GameObject | Light menu to add a new Spotlight to the scene.
  3. Rename the new light Flashlight.
  4. Make the Flashlight a child of the camera rig. To do this, drag the Flashlight asset to Player/OVRCameraRig/TrackingSpace/CenterEyeAnchor in the Hierarchy panel.
  5. Set the Flashlight's attributes to the following: Position 0,0,0; Rotation 0,0,0; Spot Angle 55; Intensity 2.
  6. Put on the headset again and hit the Play button. Adjust the materials or Flashlight as needed.
  7. Save the ShootingRange scene.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.205.154