Hey guys, how would i make a 3D model disappear when i enter a collider, and also play a sound when the 3d model disappears?
If you need any further questions, feel free to ask.
Thanks ![]()
Hey guys, how would i make a 3D model disappear when i enter a collider, and also play a sound when the 3d model disappears?
If you need any further questions, feel free to ask.
Thanks ![]()
This should help with the collider.
There are several parts to that task, so letβs unpack the steps for you to look up each step:
Step 1 is mostly what Ian said: set the collider as a Trigger, and then give it a script with an OnTriggerEnter() method. Step 2 first requires you to get a reference to the object (there are multiple ways to do that) and then either Destroy it or set Active=false. Step 3 also requires a reference in the script, this time to the AudioClip, and then Play() or PlayOneShot()
(btw my book Unity in Action covers all this if you want to check it out)