Inputs / Controls

Find input calls inside FlashlightController & FlashlightInteractor script you will find a method called:

FlashlightInteractor (Line 50)

[Header("Pickup Input")]
[SerializeField] private KeyCode pickupKey = KeyCode.Mouse0; // Key used to pick up flashlight items

// Handle input to pick up the flashlight item
if (interactiveItem != null)
{
    if (Input.GetKeyDown(pickupKey))
    {
        interactiveItem.ObjectInteract(); // Call item's interaction logic
    }
}

Flashlight Controller

The initial fields that can be edited as seen below:

[Header("Flashlight Controller Inputs")]
[SerializeField] private KeyCode flashlightSwitch = KeyCode.F; // Turn flashlight on/off
[SerializeField] private KeyCode reloadBattery = KeyCode.R; // Reload battery input
[SerializeField] private KeyCode toggleFlashlightInv = KeyCode.Tab; // Toggle flashlight UI

In the PlayerInput method you will find:

  • Flashlightswitch for on and off

  • Reloading batteries

  • Toggle flashlight inventory on and off

Last updated

Was this helpful?