I have a 2d vehicle moving along a 2d surface, and the camera is orthographic, and follows the vehicle side on as it moves. I need the camera to zoom in and out a bit when the vehicle jumps over a ramp, so the higher it goes the further out the camera zooms, or rather changes orthographic size, and then reverts back when the vehicle lands again, with smoothing, is this possible?
right ive worked out the body of the script, but how do I call in the ‘carHeight’ from the raycast on the gameobject, into the script on the camera? anybody?
It depends how you’re making your camera moves, but I guess it’s a child of the vehicle. So, when it jumps, the camera jumps to, changing it’s heights, and you want the size to change as well. This is what I would do in a script attached to the camera :