Hello, I am having a little problem and I can’t seem to figure out why this is happening. So, inside my Pawn class (BasePawn) I got 2 bool variables that need to invert their values on keyboard release (left shiftclick). I did link PlayerInputComponent->InputAction correctly, since it does print message on button release.
I am calling it inside BasePawn like this:
void ABasePawn::SetNextPlayer()
{
bIsRedPossessed = !bIsRedPossessed;
bIsBluePossessed = !bIsBluePossessed;
}
So, the values actually invert on every 2nd key release, these are the results:
1, 0 ---- should be ----> 1, 0
1, 0 ---- should be ----> 0, 1
0, 1 ---- should be ----> 1, 0
0, 1 ---- should be ----> 0, 1