Adding the Box Collider

Once the GazeManager and cursor are in place, the next step is to identify the gazeable objects. As you know, the Box Collider is the base for collision primitives in Unity. Here, we will handle the gaze for each floor; hence, we would need to add a Box Collider component to each floor object.

For this 3D Model, we have two wings and a few floors in each wing (right Wings - floor 0 to floor 3 and left wings - floor 0 to floor 5), which you can clearly identify from the model. Select individual floor objects from the wings and add Box Collider components from the Inspector window. The following steps explain the process for one of the floors:

  1. Expand the r_wing_grp Game Object from Object Hierarchy.
  2. Select r_wing_third_floor_glass.
  3. Navigate to the Inspector window| Add Components | Add Box Collider.
Box Collider added in right wing--3rd floor

Follow the same steps for all the floors and add the Box Collider for each of them so that we can start gazing at each floor.

Box Collider added in each floor
..................Content has been hidden....................

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