- Home /
Minecraft styled death?
How do I make a death animation and then the object disappear and then it plays particles on the spot where it died?
You just answered it yourself. $$anonymous$$ake a death animation, destroy the player object, then put a particle system on the spot he died.
Answer by ANGRYSH4RK · May 11, 2014 at 06:46 PM
The following is a SUPER simple example of how you would do it, you could get a little more sophisticated by using different animations and movements with LeanTween.
Try using LeanTween and do the following:
public GameObject player;
LeanTween.rotate(player, new Vector3(90f,0f,0f), 1.5f);
To have it disappear the easiest way would be:
public GameObject player;
Destroy(player);
After the LeanTween animation has finished.
As for the particles,
Create an Empty Game Object.
Add these components, [Ellipsoid Particle Emitter, Particle Renderer, Particle Animator]
Set ellipsoid particle emitter to one shot:
Play around with and tweak the particles until you get the desired effect.
Answer by Hachley · May 11, 2014 at 06:45 PM
The sequence in one script would be: Make the gameobject play death animation>spawn all the particles/drop items>delete the gameobject. I seriously suggest you learn programming js/c# before trying to make anything in Unity, after that learn this and then you'd think twice before asking questions with enormous magnitude to them.
I suggest you to learn Java(it's like javascript) since it's easier at start than c#, and here is a good place to start.
Your answer
Follow this Question
Related Questions
C# into JavaScript 1 Answer
How can I change this C# code into Javascript? 0 Answers
Unity Account system 1 Answer
[C#] PlayerRelativeControl conversion errors 0 Answers
Why not Boo? 1 Answer