Where are inputs?

Where is the input reference?

There are TWO input reference in this package and it is located below:

  • ExamineInteractor script has an input for interacting with objects with the raycast

  • ExamineItem script has an input for opening and closing the keypads

  • Edit the input keys in the ExamineInputManager script

Changing the Input:

ExamineInputManager:

public class ExamineInputManager : MonoBehaviour
{
    [Header("Raycast Pickup Input")]
    public KeyCode interactKey;

    [Header("Rotation Key Inputs")]
    public KeyCode rotateKey;
    public KeyCode dropKey;

    public static ExamineInputManager instance;
}

ExamineItem:

void ExamineInput()
{
    float h = invertRotation ? rotationSpeed * Input.GetAxis(mouseX) : -rotationSpeed * Input.GetAxis(mouseX);
    float v = invertRotation ? rotationSpeed * Input.GetAxis(mouseY) : -rotationSpeed * Input.GetAxis(mouseY);

    if (hasInspectPoints)
    {
         FindInspectPoints();
    }

    if (Input.GetKey(ExamineInputManager.instance.rotateKey))
    {
         gameObject.transform.Rotate(v, h, 0);
    }
    else if (Input.GetKeyDown(ExamineInputManager.instance.dropKey))
    {
         DropObject(true);
    }
}

ExamineInteractor:

if (examinableItem != null)
{
    if (Input.GetKeyDown(ExamineInputManager.instance.interactKey))
    {
        examinableItem.ExamineObject();
    }
}

Last updated