Hey guys, I'm following a youtube tutorial and i think my code is out dated... my code matches his but its giving me the 1502 and 1503 error codes. any thoughts? Code (csharp): Transform player; Quaternion targetLook; Vector3 targetMove; public float smoothLook = 0.5f; public float smoothMove = 0.5f; public float distFromPlayer = 5; public float heightFromPlayer = 3; void Start () { player = GameObject.FindWithTag ("Player").transform; } void Update () { targetMove = player.position + (player.rotation * new Vector3 (0, heightFromPlayer, -distFromPlayer)); //this is where the error code says the problem is. transform.position = Vector3.Lerp (transform.position, targetLook, smoothMove * Time.deltaTime); targetLook = Quaternion.LookRotation (player.position - transform.position); transform.rotation = Quaternion.Lerp (transform.rotation, targetLook, smoothLook * Time.deltaTime); Assets/Chapter 2/_Scripts/CameraScript.cs(25,46): error CS1503: Argument `#2' cannot convert `UnityEngine.Quaternion' expression to type `UnityEngine.Vector3' Assets/Chapter 2/_Scripts/CameraScript.cs(25,46): error CS1502: The best overloaded method match for `UnityEngine.Vector3.Lerp(UnityEngine.Vector3, UnityEngine.Vector3, float)' has some invalid arguments
You have targetLook instead of targetMove in your code here Code (CSharp): transform.position = Vector3.Lerp (transform.position, targetLook, smoothMove * Time.deltaTime); you lied about having it exactly the same !!!!!! ^_^ (or maybe the guy in the video made the error and fixes it later in the vid) the console should have given a warning like "targetMove was assigned, but not used" or something.
These little details i keep over looking is getting old lol i gotta start paying more attention to what i code lol thanks