Change "Hard Look At" Up axis

Hi,

I’m trying to set up a dolly track with a LookAt target for my project and I’ve run into a problem that I’m not able to resolve. I’m making a top-down game with 2D collision and 3D art, which means my entire game is built rotated 90 degrees, effectively making the Z axis the up axis instead of the default Y axis. As a result I’m getting a roll instead of a yaw when the camera pans around the tracked target.

This is what it currently looks like when I’m trying to pan using LookAt: - Find & Share on GIPHY

Is there any way to change the up axis of my virtual camera, or perhaps any way to work around this limitation? The “Hard Look At” option only seems to be in world space with no options to change the up axis.

Would be super grateful for any suggestions!

EDIT: After looking a bit further, I realized I could add a Cinemachine Brain to the the virtual camera and assign a custom transform for the up axis! It seemed to do the trick for me :slight_smile:

It’s possible in Cinemachine to globally override world Up. Point this field to a GameObject that has the desired orientation (in your case this would be an object rotated so that its local Y axis points towards world Z):

6333432--702876--upload_2020-9-21_9-34-35.png

Hey, thanks for the reply :slight_smile:
Stumbled upon this just a few seconds before your reply. That’s a super useful feature!

Cheers!