| | |
| | | private void Start() |
| | | { |
| | | sceneCamera = GameObject.Find("SceneCamera3D").GetComponent<Camera>(); |
| | | |
| | | Invoke("LookAtCamera",0.2f); |
| | | } |
| | | |
| | | public Vector3 offect = new Vector3(0, 0.07f, 0.04f); |
| | | |
| | | private void LookAtCamera() |
| | | { |
| | | transform.LookAt(transform.position + sceneCamera.transform.rotation * Vector3.forward, |
| | | sceneCamera.transform.rotation * Vector3.up); |
| | | |
| | | transform.localPosition = offect; |
| | | } |
| | | |
| | | // Update is called once per frame |
| | |
| | | void LateUpdate() |
| | | { |
| | | // transform.LookAt(sceneCamera.transform); |
| | | transform.LookAt(transform.position + sceneCamera.transform.rotation * Vector3.forward, |
| | | sceneCamera.transform.rotation * Vector3.up); |
| | | |
| | | } |
| | | } |
| | | } |