Flashlight Sys - Setup

Flashlight System - Video Setup

Flashlight Controller Main Setup

Make sure to have a "Flashlight_Canvas" object in your scene which will have all the UI elements. This will be a child of the "AK_CanvasContainer" if you've already imported it from the initial setup

Flashlight System - Basic Steps

  1. Make sure you have the Flashlight Canvas added

  2. Make sure your FPSController is a child of a parent object, this parent object should also have a child of "FlashlightSwing" attached. See below.

  3. Make sure the "FlashlightSwing" GameObject has a "Flashlight_Spot" as a child, including:

    1. FlashlightMovement script

    2. Spotlight component

  4. Add a "Flashlight Controller" prefab or script to an empty GameObject

  5. Make sure the "FlashlightController" script is UNTICKED by default or you will be able to interact as if you had a flashlight at the start

  6. Add a PBR flashlight or Battery object to your scene and do have the following:

    1. Set the tag to "InteractiveObjects"

    2. Set the layer to "Interact"

    3. Add a "Box Collider"

    4. Add an "AKItemController" and set the value to "FlashlightSys"

    5. Add the "FlashlightController" (Or Manager) depending on the naming conventions you use to the empty slot!

    6. Add the "FlashlightItemController" script and set it to "Flashlight" or "Battery" depending on the item you wish to use.

    7. Do the same for the battery object but change the settings accordingly.

See more details below:

Flashlight Controller Script

This object should be an empty GameObject and it will control everything that goes on for your flashlight system!

Flashlight Parameters:

UI References:

Flashlight References:

Flashlight Object - Setup

Flashlight Object setup - You can add a PBR Flashlight Object to your scene

  • Make sure your flashlight object has a tag of "InteractiveObject" and a Layer of "Interact"

  • Add a "Box Collider" to your object

  • Add an "AKItemController" - Set the System Type to: "FlashlightSys"

  • Add a "FlashlightItemController" script to the object

    • Add the "FlashlightController" gameobject - Which will have the "FlashlightController"

    • Choose the object type: Flashlight

Battery Object - Setup

Battery Object setup - You can add a PBR Battery Object to your scene

  • Make sure your flashlight object has a tag of "InteractiveObject" and a Layer of "Interact"

  • Add a "Box Collider" to your object

  • Add an "AKItemController" - Set the system type to: "FlashlightSys"

  • Add a "FlashlightItemController" script to the object

    • Add the "FlashlightController" gameobject - Which will have the "FlashlightController"

    • Choose the object type: Battery

Default Controls

  • Left Click to interact with a pickup

  • Press “F” to turn the flashlight On / Off

  • Press “Q” to replace a battery

  • Press “TAB” to open the inventory

NOTE: The flashlight manager does have an option to include an "Infinite battery option, so the flashlight will never run out of power!

These can be edited in the "InputManager"

Last updated