Untitled
unknown
csharp
a year ago
447 B
6
Indexable
private Transform player; void Start(){ player = GameObject.FindWithTag("cameraPlayer").transform; } // Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)){ Vector3 newLocation = player.forward * 5; Vector3 off = Quaternion.Euler(0,0,0) * newLocation; transform.position = player.position + off; } }
Editor is loading...
Leave a Comment