Spawn a prefab on collosion
if anyone can tell me a script to use that spawns a prefab on colosion i would apprecheat it
Comment
Best Answer
Answer by Equ1l1brist · Feb 03, 2017 at 04:36 PM
This should do the job for you.
public GameObject prefab; //Drop your prefab here in the inspector
void OnCollision (Collision _col){ Instantiate(prefab, Vector3 position, Vector3 rotation); }
Your answer
![](https://koobas.hobune.stream/wayback/20220612110243im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Load heightmap automatically 0 Answers
How to create multiple terrains from one heightmap via C# script? 0 Answers
Need Help With My Script And Animator. 0 Answers
How to create a "trap" when ground is tiled with collider. 0 Answers
fuel indicator 0 Answers