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
Make sure you have the Flashlight Canvas added
Make sure your FPSController is a child of a parent object, this parent object should also have a child of "FlashlightSwing" attached. See below.
Make sure the "FlashlightSwing" GameObject has a "Flashlight_Spot" as a child, including:
FlashlightMovement script
Spotlight component
Add a "Flashlight Controller" prefab or script to an empty GameObject
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
Add a PBR flashlight or Battery object to your scene and do have the following:
Set the tag to "InteractiveObjects"
Set the layer to "Interact"
Add a "Box Collider"
Add an "AKItemController" and set the value to "FlashlightSys"
Add the "FlashlightController" (Or Manager) depending on the naming conventions you use to the empty slot!
Add the "FlashlightItemController" script and set it to "Flashlight" or "Battery" depending on the item you wish to use.
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