Hey guys,
I’ve got some characters split into triggers on the left and right sides of the screen, and they’re set to jump when their corresponding side’s jump button is pressed. It works on average 9/10 times, but can go on longer streaks of working correctly. I can’t figure out why it would occasionally fail, albeit rarely. Any ideas? Thanks in advance.
void OnTriggerStay (Collider other)
{
if (other.tag == "JumpZoneB") {
if (Input.GetButtonDown ("JumpB")) {
if (status == PlayerMoveStatus.Jump) {
DOUBLEJUMP ();
}
if (status == PlayerMoveStatus.Run) {
JUMP ();
}
}
}
if (other.tag == "JumpZoneA") {
if (Input.GetButtonDown ("JumpA")) {
if (status == PlayerMoveStatus.Jump) {
DOUBLEJUMP ();
}
if (status == PlayerMoveStatus.Run) {
JUMP ();
}
}
}
}