Objectives


Class and Learning Communication

Unity

If time allows

Contents


Class Zoom Recording

Presentation

https://NewSchool.zoom.us/rec/share/eoDeK2CWaYRpFG3xyfmYuZdERuktTRG4fO2u_p9N20-U1Pij_fukLkbzRRfA6DqJ.dOtA1P4P1IVTcqt0

Passcode: !?H%B+c3qM

Unity (soon updated)

Unity


Light Trigger

Trigger Light On and Off

Test Video

Screen Recording 2024-02-29 at 5.22.10 PM.mov

Setup

  1. Create or Select Your Light Object you wish to control

  2. Create a Trigger Zone: 2 ways

    1. Add Collider on Lighting object

      • you can directly add a Collider component to the lighting.
      • Check Is Triggerproperty to true.
    2. Add Collider to an Empty Game Object

      You can create a trigger zone by adding a Collider to an Empty GameObject and checking the "Is Trigger" option in the Collider component.

      I used an empty gameobject and add Box Collider and created a trigger zone.

  3. Create and Attach the Script

  4. Assign the Light Object:

    Screen Shot 2024-02-29 at 6.14.28 PM.png

  5. Tag the Player

  6. Test

Light Trigger On Once

Test Video

Screen Recording 2024-02-29 at 5.11.54 PM.mov