if (Input.GetKeyDown("space") && (ThrowCD == 0.00f))
{
WhereILook();
Instantiate(NextFire, LaunchPointHor.position, Quaternion.Euler(0, 0, RotateDeg));
ThrowCD = CD;
Thrown = true;
Debug.Log("Thrown");
}
My character is supoused to throw some object every time I press “space” but it do ir some times and some times I press it does nothing, My code is in FixedUpdate and I made a debug.log to check if the the program get the keyDown but it does just some times, becaused when I press “space” and it doesn´t throw the object the program either detect the Key.down and it does it randomly, I can not detect under what situations it does not work, it seems to be randomly, it does not make scence to me.
Dates
FixedUpdated Set: 0.02
Code: C#
Metoth: FixedUpdate