Fixed global portal trigger
This commit is contained in:
@@ -26,6 +26,9 @@ public class Areaportal : UdonSharpBehaviour
|
|||||||
|
|
||||||
public override void OnPlayerTriggerEnter(VRCPlayerApi player)
|
public override void OnPlayerTriggerEnter(VRCPlayerApi player)
|
||||||
{
|
{
|
||||||
|
if (!(player.IsValid() && player.isLocal))
|
||||||
|
return;
|
||||||
|
|
||||||
this.portal.open = true;
|
this.portal.open = true;
|
||||||
|
|
||||||
foreach(GameObject imposter in this.imposters)
|
foreach(GameObject imposter in this.imposters)
|
||||||
@@ -36,6 +39,9 @@ public class Areaportal : UdonSharpBehaviour
|
|||||||
|
|
||||||
public override void OnPlayerTriggerExit(VRCPlayerApi player)
|
public override void OnPlayerTriggerExit(VRCPlayerApi player)
|
||||||
{
|
{
|
||||||
|
if (!(player.IsValid() && player.isLocal))
|
||||||
|
return;
|
||||||
|
|
||||||
this.portal.open = false;
|
this.portal.open = false;
|
||||||
|
|
||||||
foreach(GameObject imposter in this.imposters)
|
foreach(GameObject imposter in this.imposters)
|
||||||
|
|||||||
Reference in New Issue
Block a user