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; } }
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; } }