Example #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Planet")
     {
         acceleration = Vector3.zero;
         speed        = Vector3.zero;
         floor();
         planetInfos = other.GetComponent <PlanetInformations>();
     }
     else if (other.tag == "Elevator")
     {
         canElevate       = true;
         elevateDirection = other.transform.forward;
     }
 }
Example #2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Planet") {
            acceleration = Vector3.zero;
            speed = Vector3.zero;
            floor ();
            planetInfos = other.GetComponent<PlanetInformations>();
        } else if (other.tag == "Elevator") {
            canElevate = true;
            elevateDirection = other.transform.forward;

        }
    }