2024-02-02 12:54:47 +01:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
2024-02-07 20:26:35 +01:00
|
|
|
// syncs the position of the player glass and the view in the alternate scene. could probably be better but who cares
|
|
|
|
|
2024-02-02 12:54:47 +01:00
|
|
|
public class PositionSync : MonoBehaviour
|
|
|
|
{
|
|
|
|
public GameObject targetGameobject;
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
transform.rotation = targetGameobject.transform.rotation;
|
2024-02-05 18:34:22 +01:00
|
|
|
transform.position = new Vector3(targetGameobject.transform.position.x, targetGameobject.transform.position.y + 100f, targetGameobject.transform.position.z);
|
2024-02-02 12:54:47 +01:00
|
|
|
}
|
|
|
|
}
|