public override void DoTransform(Player player, StepThroughPortal targetPortal)
    {
        Vector3 newPosition = targetPortal.transform.position + player.transform.forward * 1;

        targetPortal.OrientToDirection(player.GetComponentInChildren <Camera>().transform.forward);
        player.transform.position = newPosition;
        player.GetComponentInChildren <Rigidbody>().velocity = new Vector3();
    }
Ejemplo n.º 2
0
 public abstract void DoTransform(Player player, StepThroughPortal targetPortal);
 public override void DoTransform(Player player, StepThroughPortal targetPortal)
 {
     GameObject.Find("texturedhousemod2").transform.Rotate(m_rotation.x, m_rotation.y, m_rotation.z);//.rotation *= m_rotation;// Rotate(player.transform.position, xVec, rotationAngle);
     player.transform.position = targetPortal.transform.position + player.transform.forward * 1;
     player.GetComponentInChildren <Rigidbody>().velocity = new Vector3();
 }
Ejemplo n.º 4
0
 private void Awake()
 {
     stats = GameObject.Find("Portal1").GetComponent <StepThroughPortal>();
 }