I’m just working through Chapter 3 : Components - in the part where we create a Camera Follow script - for some reason the camera is positioning itself way down below the BobbleArena.
I checked the transform Y value of the BobbleArena, which is 13.6 - the transform Y value of space marine is 12.54, so he’s standing right on the Arena properly in the Game View.
The Camera follow script is attached to the Main Camera which is in a “CameraMount” empty container. The transform Y value of the Main Camera is 40 with a rotation of 30 so it looks down at the Space Marine.
When I run the game, the camera follow script makes the Camera zoom way under the Arena. There is only one line in the CameraFollow script :
if (followTarget != null) {
transform.position = Vector3.Lerp(transform.position,
followTarget.transform.position, Time.deltaTime * moveSpeed);
}
followTarget is set to the Space Marine GameObject.
I tried replacing the third paramteter of the Lerp function with 1.0f, 0.0f and 0.01f and it make no difference to the camera behaviour. I also tried changing the Camera’s transform Y position to a much higher value and it makes no difference. The camera always zooms down below the Arena.
Anyone else have any kind of issue with this?