Hi How can i make audio play when object hit collision,just like in portal 2 game when cube hits the ground or other collisions it plays “impact” sound,guys i need script example cause i dont understand ANYTHING about this,so please help me :)) thanks for attention.
Where the sound comes from the cube, attach the AudioSource component to the cube and put in the sound effect. Add a collider to both the cube and the floor and select. Add this script to the cube.
Where the sound comes from the floor, attach the AudioSource component to the floor and put in the sound effect. Add a collider to both the cube and the floor. Add this script to the floor.