- Home /
How do I spawn an object where my Player is currently positioned at, and make it disappear over time? Something like cracks on a ground.
So wherever my Player goes, on Key Down, spawns a cracks prefab at that place and stays at that place. And after say 5 seconds, the cracks start to fade out and disappear. Also, the cracks need to look like they are growing outwards from the Players' position till they reach the max size and stop growing, after which they start fading out. Any ideas, or pointers are appreciated.
Is there a reason to not use animations for this? I mean just set a bool on an animator that will be activated per tile?
Answer by meat5000 · May 12, 2014 at 11:10 PM
Instantiate a Prefab of a plane that has a cracked texture on it with Particles/Additive shader at player's base position. Scale and move, or swap the texture to simulate crack growth. Fade it with Alpha after which it destroys itself.
Otherwise I'm sure you could One-Shot it from the particle system.
Your answer
Follow this Question
Related Questions
How to Instantiate prefabs with function Update? 1 Answer
How do i prevent an object instantiating another object straight away 2 Answers
Spawning objects on trigger does not work as expected 2 Answers
Having Trouble with Instantiating an object on an axis 2 Answers
Spawn: Instantiate GameObject 1 Answer