I dont know if thiis is right place to ask this. Ive been looking around for a couple of days to solve this simple, I believe, problem. Ive downloaded almost a dozen scripts but none tend to work. I need a sound to play on collision with an object with a collider by my player. I created a box collider thats not triggered that I want to put a soundclip script on the object my player collides with.I want the object to play the sound not the player. My player has a rigid body set to is kimetic and a box collider that has the trigger set to on. The object is the receive end of a teleporter so that when I land on the object a ‘one shot’ sound plays. Would be nice if the sound only triggered when player lands on object when teleported but may be asking too much.
Kinematic does not call any collisions afaik. Use a dynamic rigidbody for the player (since it is moving after all)
Kinematic rigidbodies do respond to both collision and trigger events and so I’ve no idea why your code isn’t working. But keep tinkering and you’ll figure it out!.
Got it solved. Im using Unity 2022 and most the code floating around out there is in JS. Anyways got my sound being triggered and playing on collision.Thx