Need help blending between orbital freelook camera and 3rd person rig - Cinemachine 3.1.4

I upgraded to Cinemachine 3 recently and reworked my camera system with it. It’s been great so far, but I’ve hit a roadblock and need some advice.

The structure is basically a CameraManager at the top of the scene and the cinemachine player cameras as children. the manager holds state and has an api for switching between them using priority. There are several cameras but only two important for this question.

  1. UprightCamera - Orbital Follow (3-ring) and Rotation Composer, pretty standard.
  2. AimCamera - 3rd person follow and 3rd person aim extension, goes over the right shoulder.

Our KCC has previously been set up so that each camera would maintain a MovementHeading quaternion in state. The movement system would use this value to define forward in the movement loop.

It took me a few tries to set up an aim camera. I’ve had drafts that were orbital with an offset and 3rd person rigs. But in my latest system I tried to set it up with the model laid out in the cinemachine samples. There’s a player core object (though mine has no parent) that implements IInputAxisOwner and uses an InputAxisController to rotate with player input. Its position is locked to the player’s position.

This works great, but now I’m having issues blending between the two. As I debugged it I realized it’s because I now have two models working simultaneously: the orbital follow uses player input to drive its position and rotation around a central object, and the aim camera uses player input to drive the rotation of a central object it’s rigidly fixed to.

I can’t figure out how to sync these two pairs of axes. At first I had them each controlled with their own input axes, but responding to the same input action. But I noticed that after running around for a bit, the “forward” would drift apart between the two cameras, and one would become askew. I figured out that this was primarily happening during camera blends, but after futzing with the blend settings and input settings I couldn’t get it to stop.

I also refactored the movement system to use the player core pivot object to get its forward direction, instead of the camera rotation. It seemed a little more direct. But it didn’t solve the issue and I’m not married to the idea.

I’m curious how other people implement this from a design perspective. What I’m trying now is driving the orbital camera’s input axes using the input axis values of the player core pivot object, but either I’m missing something or there’s no way to override the input axes on the orbital camera with another instance. And it seems kind of backwards.

I also looked into how the Cinemachine samples approached it, but they didn’t. The Aim Camera samples use a 3rd person rig that’s similar to an orbital, but not orbital. I could do this as a backup but I don’t really want to unless it’s best practice for some reason.

I’m curious to hear about how other people have approached this. I drew up a little system design if it’s helpful. Thanks in advance.

Why don’t you do it exactly as it is in the ThirdPersonWithAimMode sample? That way, the cameras are always driven by the player core, and everything stays simple, consistent, and straightforward. Why did you choose an OrbitalFollow for the UprightCamera instead of a ThirdPerson rig?

That said, it’s still possible to use the OrbitalFollow and sync up the axes: just add an InheritPosition blend hint to your orbital follow, and the axes will automatically take on the required values when the camera is activated. You can try it in the sample: change the Free Camera from ThirdPerson to OrbitalFollow/RotationComposer and set the blend hint.

And incidentally, there is no obligation to use Cinemachine’s InputAxis mechanism in your player controller. The samples used it only for expedience: it easily supports both legacy and new input systems. You can drive your controller any way you like, Cinemachine will only care about its transform.

The aim camera is pretty new as we just added the main functionality that uses it. So I’ve been using the orbital rig for all my cameras for the past few years. I like its configuration and controls, and the benefits of mapping the orbit radii to inputs in cm3, being able to configure different lens settings for each orbit, etc. I’ll play around with the 3rd person rig to see how closely I can emulate it.

I was able to get it working by overriding the orbital follow’s input axis values on late update with the values from the player core object. I’ll play around with the blend hint settings though I feel like that wasn’t working for me initially; will report back.

Thanks for the help