O'Reilly logo

Creating E-Learning Games with Unity by David Horachek

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing the LevelLogicObj GameObject

When instantiated, the LevelLogicObj object will be detected as soon as the player and racers enter the LevellogicObj's trigger volume. When three racers have crossed the finish line, it will determine if the player has met the objectives of the race or not, and it will enable either the pass or fail retry pop up. In order to implement the LevelLogicObj object, we need to perform the following steps:

  1. Create a cube game object named LevelLogicObj. Scale, orient, and position it so that it surrounds the finish line in the level as shown in the following screenshot:
    Implementing the LevelLogicObj GameObject
  2. Make sure it has a Box Collider component and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required