In my character controller class, I have the following code:
function Update()
{
shoot1 = Input.GetAxis("Fire1");
shoot2 = Input.GetAxis("Fire2");
if (shoot1)
{
Debug.Log("Primary");
}
if (shoot2)
{
Debug.Log("Secondary");
}
}
The issue I’m facing is, if I left click or right click, I get the message ‘Primary’ or ‘Secondary’ as expected. However, once I have clicked a certain button (say left click), any subsequent clicks of that button won’t give me the debug message.
Am I supposed to flush the values of shoot1 and shoot2 every update cycle or something?