Bug in PunBasics-Tutorial on Jump
Options
I just read out PUN Basics Tutorial. I did all step by step but in the end robo still damage himself on jump. I opened included Demo in PUN asset but this bug still there. Probably main bug somwhere in PlayerManager with photonView.isMine in OnTriggerEnter/Stay. How to fix it?
0
Comments
-
Here my code
void OnTriggerEnter(Collider other) {
if (!photonView.isMine) {
return;
}
// We are only interested in Beamers
// we should be using tags but for the sake of distribution, let's simply check by name.
if (!other.name.Contains("Beam")) {
return;
}
Health -= 0.1f;
}
Probably need to check that "other" is not my robo. How to implement this?0 -
Hi @mrsilmar,
did a quick test on the demo included in the PUN package from the Asset Store which worked as expected; the character isn't hitting himself. So I would say that the OnTriggerEnter callback seems to be correct as it is. When you set up the character yourself please try to push the beams a few (more) pixels away from the character's collider as seen on the screenshot in the tutorial. If it still isn't working afterwards, please feel free to ask again.0