This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on script found at http://wiki.unity3d.com/index.php/Floating_Origin | |
// on 2021-05-13, modified substantially - mostly to accomodate multiplayer, | |
// by introducing threshold and offset values. | |
using UnityEngine; | |
public class FloatingOrigin : MonoBehaviour { | |
public static FloatingOrigin Instance; | |
// Largest value allowed for the main camera's X or Z coordinate before that |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on the Unity Wiki FloatingOrigin script by Peter Stirling | |
// URL: http://wiki.unity3d.com/index.php/Floating_Origin | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class FloatingOrigin : MonoBehaviour | |
{ | |
[Tooltip("Point of reference from which to check the distance to origin.")] | |
public Transform ReferenceObject = null; |