I have a simple, one line script (if you don’t include all the generic things like variable and method declarations and stuff), which takes in 3 parameters for the x, y and z positions, for following the player.
Currently the camera is following the y axis by setting its y position to that of the player Transform, but I need it to float slightly above the player, as right now it feels like it’s stuck to the ground and the angle is very unplesant. So I need some way of it following the player along the y axis, while still having an offset.
The current line I’m using can only take a maximum of 3 parameters.
Here’s the line:
transform.position = new Vector3 (player.position.x, player.position.y, offset.z);
Any idea how I would do it? I can’t think of anything.
I understand that currently I’m just setting a new position for the camera. I have various ideas I think would work, but they all involve adding more parameters to the line, which currently is giving me errors.