Created
October 5, 2018 14:27
-
-
Save tsubaki/e05146779f6710e21bd5065d8bbcd1cf to your computer and use it in GitHub Desktop.
This file contains 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
using UnityEngine; | |
public class AutoSyncTranformTest : MonoBehaviour | |
{ | |
[SerializeField] BoxCollider target; | |
void Update() | |
{ | |
RaycastHit hit; | |
target.transform.position = new Vector3(0, 0, 5); | |
Physics.Raycast(transform.position, new Vector3(0, 0, 10), out hit); | |
Debug.Log(hit.distance); | |
target.transform.position = new Vector3(0, 0, 10); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment