I have a third person witch can boxing and throw fire balls. Every time he do hes animation it returns to the pisition where I created the animations. How can I do the animations without the character will change hes position?
here is a part of the scrip of my character:
function Update ()
{
var controller : CharacterController = GetComponent(CharacterController);
transform.Rotate(0, Input.GetAxis ("Horizontal") * rotateSpeed, 0);
var forward = transform.TransformDirection(Vector3.forward);
var curSpeed = speed * Input.GetAxis ("Vertical");
controller.SimpleMove(forward * curSpeed);
//Shooting!
if(Input.GetButtonDown("Jump"))
{
animation.Play("BodyThrow");
var bullit = Instantiate(bullitPrefab, transform.Find("SpawnPointB1").transform.position, Quaternion.identity);
bullit.tag = "bobProjectile";
bullit.rigidbody.AddForce(transform.forward * 5000);
}
if(Input.GetKeyDown("v"))
{
animation.Play("BobBoxing");
}
}