OnTriggerEnter and OnTriggerExit fire every frame if one of the triggers is held by another player
Sacchan
Test world here: wrld_9e27c160-fd8d-41f4-a614-0baed9daa821
Enter with 2 clients, and have one of them hold a torch inside the white cube. Look at the debug console, you should see that the client holding the torch sees OnTriggerEnter when the torch is first put in, and OnTriggerExit when the torch is moved out.
The other client will see OnTriggerEnter and OnTriggerExit spamming up their console.
Log In
DrakenStark
Seems this issue has resurfaced with a recent patch or was never resolved.
It's as if OnTriggerExit is acting as OnTriggerStay.
This is it for the code while the Collider is actually static in a relatively blank world.
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
namespace DrakenStark
{
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class CannonReadyExit : UdonSharpBehaviour
{
private void OnTriggerExit(Collider other)
{
Debug.LogWarning(name + ": The only pickup in the world has triggered OnTriggerExit.", gameObject);
}
}
}