- Home /
Duplicate Question
How to instantiate on collision?
I am making this psychological horror game and basically i want the game to instantiate a mad doctors face when the player collides with an invisible cube. I know how instantiate works (Instantiate(what, where, rotation)), but how would i instantiate the doctors face and destroy it again after a very short duration when the collision occurs? I know that the script should include the instantiating bit, and destroying both the instantiated doctor and invisible cube. What would the (Unity)script look like?
Follow this Question
Related Questions
Prevent instantiating on collider 1 Answer
Destroy a GameObject 2 Answers
Removing A Component From An Instantiated Prefab After X More Are Instantiated 1 Answer
How to instantiate multiple prefabs in multiple positions? 0 Answers
BoxCollider2D failling verification when Instantiate (Fixed, Cause: big derp) 1 Answer