I’m using a vcam with following settings:
as well as setting the correct world up here:
The vcam is a child of the target-transform.
The camera alignment works perfectly, the only problem is that rotating the target/character also rotates the camera. Is there a quick way to fix this or do I need a completely different approach?
I have seen the SphericalSurfaceFollow demo, but CM FreeLook1/Orbital Transposer feels much worse than a Framing Transposer
Any help is greatly appreciated!
Parenting the vcam to the target in not usually a good idea. Try unparenting it.
Thank you for the response!
Unparenting the vcam causes weird camera flips when changing gravity direction
The Cinemachine POV algorithm will set the camera rotation relative to the vcam’s parent object. So, if the vcam is a child of the target then the camera will rotate with the target.
I don’t understand what you mean by “gravity flip”. How does this relate to the world up override? What do you expect to happen when world up changes?
If you would like to share your test project with me, it might be easier to find a solution.
Sorry for the vague language. “Gravity direction” is constantly being set based on the normal that the character is touching. The “World Up Override” is based on that gravity direction/normal, that way the camera’s “up” is always aligned with the current ground normal.
This is the desired behaviour (I am not moving/controlling the camera when going over the edge, the camera is aligning itself automatically):
This is using my own camera, but I’d love to use Cinemachine because of all the nice stuff it has
Thank you for the offer, I’ll set up and share a minimal project soon
Thanks for the update, I understand what you want.
I think you can do it by having an invisible object (let’s call it GravityContext), as follows:
- Make your player character a child of GravityContext.
- Your character controller should move GravityContext instead of the player, but rotate the player to face the desired forward.
- A custom script on GravityContext takes care of rotating it when it moves over an edge (player child will be automatically carried with it).
- Use GravityContext as World Up Override in the Brain.
- Make the vcam a child of GravityContext.
Also, make sure to use the very latest version of Cinemachine (2.8.9 or, better, 2.9.1). There was a recent bugfix in POV that’s relevant to this setup.
1 Like