Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question Follow character in spherical surface without rotation

Discussion in 'Cinemachine' started by ecentinela, Mar 8, 2024.

  1. ecentinela

    ecentinela

    Joined:
    May 23, 2020
    Posts:
    7
    Hello.

    I'm trying to set up my Cinemachine camera (v3) in a particular way similar to the "FreeLook on Spherical Surface" example but always following my character using the same viewing angle (with my character) and without rotation (just horizontal and vertical traveling around the spherical world).

    Is it possible to configure that behavior or should I create a script to do it?

    Thank you.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,837
    Yes you can change the SphericalSurfaceFollow scene to behave the way you describe.
    Start by disabling player rotation in the player controller:

    upload_2024-3-8_8-52-10.png

    Then change the vcam to look something like this (set the values how you want them):

    upload_2024-3-8_8-54-11.png
     
  3. ecentinela

    ecentinela

    Joined:
    May 23, 2020
    Posts:
    7
    Hi @Gregoryl !

    Thanks for your answer! I think that this example is in Cinemachine 2. I upgraded to version 3.1 and this "SphericalSurfaceFollow" scene does not exists (and all the parameters are different now as you know). That's the reason I was looking at the "FreeLook on Spherical Surface" scene.

    Can you point me in the right direction using the new version?

    Thank you!
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,837
    It's largely the same thing, just with different names. Put Follow in the Body section, set the binding mode to Lock To Target, and enable "Strafe" in the player controller.

    upload_2024-3-10_9-21-8.png


    upload_2024-3-10_9-22-37.png
     
    Goidel likes this.