poobleme use gravity (rigidbody)
salut tout le monde
j'ai un problème avec la case use use gravity de rigidbody voila le script
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| CharacterController Character;
Vector3 Moovedirection = Vector3.zero;
void Start () {
Character = gameObject.GetComponent<CharacterController> ();
StartCoroutine (maCoroutine ());
}
IEnumerator maCoroutine(){
anim.Play ("Animation1");
yield return new WaitForSeconds (1.21f);
anim.Play ("Animation2");
yield return new WaitForSeconds (3.07f);
gameObject.GetComponent<Rigidbody> ().useGravity = true;
anim.Play ("Animation3");
yield return new WaitForSeconds (4);
anim.Play ("Animation4");
} |
ce script sert a faire une Coroutine pour laisser les temps a mes animation de se lancer , et quand
Code:
yield return new WaitForSeconds (3.07f);
pour jouer
Code:
gameObject.GetComponent<Rigidbody> ().useGravity = true;
ca ne marche plus et mon perso ne tombe pas ?
mais avant de changer de version de unity3D ca marche je ne sais pas pourquoi ?