how can i change character of player when playing game and hit something ?
how can i go back to old place when something drop on player while playing?
Well, to reset your position, you just save the original position with
Vector3 originalPosition;
void Start()
{
originalPosition = transform.position;
}
Then, when you want to reset position, use
transform.position = originalPosition;
Your other question, about changing characters, is a lot more complex, and depends a lot on exactly what it is that you want to do. Do your different characters have different movement styles? Do you cycle through characters, in a set order, or are they random?
In any case, a general solution to that is
Instantiate(nextCharacter, transform.position, transform.rotation);
Destroy(gameObject);
Where nextCharacter is a public GameObject which you have assigned a prefab to in the inspector.
Your going to have to import your model into a 3D editing software(Blender, 3DS Max)and create a new animation for it. Hopefully you have the character rigged, correct? If not, you may be in over your head.
Unity supports limited custom animations from within, but beyond basic movements, I wouldn’t even attempt it. It can actually get very tricky if your trying to be precise, at least in my opinion. Luckily, Blender is totally free, and has a lot of tutorials all over as well.
Here’s a great site for Blender tutorials.