switch (i) {//transformacion despues del matched.
case 0:
if (Input.GetKey(KeyCode.Space)) {
transform.position = Vector3.MoveTowards (transform.position, new Vector3 (p.origin.x, p.Box.bounds.max.y - transform.localScale.y - ClimbS.HeighAjustY, p.origin.z - cc.radius), PlayerStats.ClimbTime);
//transform.rotation = Quaternion.Slerp (transform.rotation, p.transform.rotation, PlayerStats.ClimbRotateTimeM);
//transform.rotation = Quaternion.Slerp (transform.rotation, p.transform.rotation, 5f);
transform.rotation = Quaternion.Euler(p.transform.rotation.x ,p.transform.rotation.y , p.transform.rotation.z);
anim.SetBool ("IsClimb", true);
ClimbS.isClimbing = true;
} else {
ClimbS.isClimbing = false;
p = null;
}
break;
ok … the problem is that when I press the space does the Transform.Position but only moves a little and every time I give it moves a little more to reach the corresponding point … I do not know what happens and I carry some I’m thinking about this but I can not figure it out!