In my game i have portals that the player can walk through and i want him to maintain his speed like if he falls. How do i do that?
script:
public GameObject otherPortal;
void OnTriggerEnter(Collider other) {
Debug.Log ("something hit the portal");
other.transform.position = otherPortal.transform.position + otherPortal.transform.forward * 1;
other.transform.rotation = otherPortal.transform.rotation;
}
↧
Trending Articles
More Pages to Explore .....