Beispiel #1
0
 void FixedUpdate()
 {
     this.GetComponent <Rigidbody>().position = sphCoord.ToVector3();
     this.GetComponent <Rigidbody>().rotation = Quaternion.Euler(0f, -1 * sphCoord.longitude, sphCoord.latitude - 90f);
     if (!colision)
     {
         this.GetComponent <Rigidbody>().AddForce(this.transform.up * -1f * gravedad);
         sphCoord.UpdateCoord(this.transform.position);
     }
     if (Input.GetButtonDown("Jump"))
     {
         this.GetComponent <Rigidbody>().AddForce(this.transform.up * salto);
         sphCoord.UpdateCoord(this.transform.position);
     }
 }