I’m making a simple FPS prototype. I want to be able to shoot when I hold down the Fire button.
As I’m using the Unity Starter FPS controller, I want to keep my Player Input in the “Send Messages” mode (not “Invoke Unity Events”). However in “Send Messages” mode, I don’t have access to CallbackContext, so I can’t find interactions like performed/hold etc.
Currently this is my code.
void OnFire()
{
//shoots gun
}
It works every time I tap the button, but not when I hold it. I could turn on a FireHeld bool, but I don’t know how to turn it off as I can’t find a way of saying “If Fire not pressed”.
Any help??