Trigger Enter & Exit Problem in Unity


(spectralgeth) #1

Hey everyone, we’re wondering if it’s a requirement in Unity to have a rigidbody placed on a player character object in order to get audio trigger entering and exiting with Fmod working.

We have fmod emitter scripts attached to box colliders for different areas of the game map and we’d like to have 2D sounds play and call upon entering the collider and to fade away upon exiting the collider, but right now it seems to work only half the time which is very odd.

Our player character is using the tag ‘Untagged’ and tagging the emitter script with the same tag does not seem to fix the issue for some reason.


(Cameron Baron) #2

One of the objects in the collision need to have a rigidbody.
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerEnter.html