*
This commit is contained in:
@@ -27,7 +27,7 @@ public class CrossHair : MonoBehaviour {
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
var ray = camera.ViewportPointToRay (new Vector3(0.5f,0.5f,0.0f));
|
||||
var ray = GetComponent<Camera>().ViewportPointToRay (new Vector3(0.5f,0.5f,0.0f));
|
||||
hasHit = Physics.Raycast (ray, out hit);
|
||||
if (hasHit) {
|
||||
target = hit.point;
|
||||
|
||||
Reference in New Issue
Block a user