Looking Left and Right

Hi,

I’m using Cinemachine as a follow camera for a car.

I wanted to ask if there is a convenient (or built in) way to look left and right immediately?

At the moment, I rotate the camera target -90°, 90° and set the Yaw/Horizontal Damping to 0.

The camera target is an empty child gameObject of the car.

This works perfectly but has some shortcomings when the car is flipped over by 90° because it sticks to the camera target’s coords. A work around I have for this is to rotate the camera target’s x axis with the car’s z axis but this feels ‘hacky’ and not efficient at all hence why I am asking this question.

Thanks in advance!

Have you tried using an orbital transposer in the body? That allows you to rotate the camera on the XZ plane around the camera. The XAxis.Value param controls the angle. By default, this is set up to respond to Mouse X, but if you want to control that yourself from script, just remove “Mouse X” from the axis name.

For the other thing, you can use the “Simple Follow with World Up” binding mode. That binds in camera space, not car space, so will be impervious to flipping cars.

Thanks for getting back to me.

Yes, I have tried the orbital transposer, but not extensively.

I will try these out and get back to you.

Thanks again.

The Orbital Transposer works great! It’s exactly what I was looking for.

It was a bit weird at first because of my Aim settings, but after setting the “Tracked Object Offset” z axis and the horizontal damping to to 0, I managed to normalize the camera.

I’ve been using Cinemachine for about 2 months now and I’ve clearly still got lots to learn.

I’ll be sure to reach out if I have any more questions.

Massive thanks for creating such an awesome tool!

1 Like