Search Unity

How to follow my player which rotates in all directions?

Discussion in 'Cinemachine' started by ngerbens, Mar 5, 2018.

  1. ngerbens

    ngerbens

    Joined:
    Nov 20, 2017
    Posts:
    33
    Hi there,

    I might just oversee a very simple solution or setup, but I'm trying to use Cinemachine as my standard cam setup, but I can't seem to have my virtual cam follow my player + rotate with it in ALL directions. (To have my player stay in place, while the world around it rotates up side down.) My player is a spaceship in a 3D space.

    Does anyone have a suggestion what setup is required?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Cinemachine Cameras care about which way is up, since that influences the way they frame their subjects. If you want the Camera's Up to always match the local Up of your spaceship, you can set a World Up override on the brain:

    upload_2018-3-5_18-5-50.png

    Put your spaceship there, and then CM will use the spaceship's local up to define Up for its purposes. Then set up your vcam to look at the spaceship. Use a Transposer with a LockToTarget binding mode. Then, the offsets you put there will be relative to the spaceship's transform.

    I think that should do it, if I understand correctly what you're looking for.
     
  3. ngerbens

    ngerbens

    Joined:
    Nov 20, 2017
    Posts:
    33
    @Gregoryl, It's exactly what I meant, and your instruction works perfectly. (When put the Aim at 'something' instead of 'Do Nothing' btw ;-) Thank you very very much for taking the time and effort to help, + Cinemachine works and looks amazing! Cheers
     
    Last edited: Mar 6, 2018
    Gregoryl likes this.
  4. ngerbens

    ngerbens

    Joined:
    Nov 20, 2017
    Posts:
    33
    Especially with the Pitch, Yaw and Roll damping my player flies like a ninja through space. Awesome.
     
    Gregoryl likes this.