Quantcast
Viewing latest article 7
Browse Latest Browse All 85

seamless portals like in the game portal

The script that I have teleports the player from one object to another with collisions but I'm looking for it to be more like a gateway sort of like in portal where you could have one foot in one and the other foot out the other. Any help or code for this would be greatly appreciated. using UnityEngine; using System.Collections; public class Portals : MonoBehaviour { public GameObject otherPortal; void OnTriggerEnter (Collider other) { if(other.tag == "Player") { other.transform.position = otherPortal.transform.position + otherPortal.transform.forward * 2; } } }

Viewing latest article 7
Browse Latest Browse All 85

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>