|
I was following a tutorial by WalkerBoy Studios about Cameras. I have an error:
I know that the problem is the 3rd variable being a Vector 2. But in the tutorial it makes velocity a Vector 2. But how would fix this problem but have the same result as the tutorial?
(comments are locked)
|
|
The answer was because I set the velocity to Vector 2 but I didn't put the X value into velocity making the code to be: thisTransform.position.x = Mathf.SmoothDamp(thisTransform.position.x, cameraTarget.transform.position.x, velocity.x, smoothTime),The answer was because I set the velocity to Vector 2 but I didn't put the position of X making the code to be: thisTransform.position.x = Mathf.SmoothDamp(thisTransform.position.x, cameraTarget.transform.position.x, velocity.x, smoothTime)
(comments are locked)
|
