Where are inputs?
Where is the input reference?
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
Was this helpful?