How do I make a death animation and then the object disappear and then it plays particles on the spot where it died?
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.
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.