Search Unity

First Person Camera

Discussion in 'Cinemachine' started by Nostromos, Nov 30, 2019.

  1. Nostromos

    Nostromos

    Joined:
    Nov 30, 2019
    Posts:
    22
    Can you use cinemachine to do a first person camera system? If so, does anyone have pointers to a tutorial?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    It's very simple:

    Take any first person conrtroller, remove the Camera component from it, and put a CinemachineVirtualCamera component in its place. Make sure that the virtual camera has DoNothing in Aim and Body sections. That way it will be 100% controlled by the first person script.

    Then, create a new Main camera and add a CinemachineBrain to it. Now you have a custom-controlled virtual camera that will play nicely and blend with any other virtual cameras you create.
     
  3. Gen_Scorpius

    Gen_Scorpius

    Joined:
    Nov 2, 2016
    Posts:
    65
    @Gregoryl Is there any timeline when Cinemachine is compatible with DOTS?

    As a workaround, the DoNothing instruction helps when synchronizing the virtual camera position manually in a system but a native integration would be very welcome.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,719
    In fact the DOTS version of Cinemachine is in active development. I can't publicly share an ETA with you at this point. In the meantime, a DoNothing vcam that gets manually synched to your FPS controller in a system is just fine. What other aspects of CM are you looking to use in this project?
     
  5. Gen_Scorpius

    Gen_Scorpius

    Joined:
    Nov 2, 2016
    Posts:
    65
    I'm in an early prototyping phase, so the fps camera workaround would be fine for now. But eventually I would want to have in addition a 3rd person camera setup (which the player can switch back and forth) and cinemachine's tracking capabilities for cinematic shots.

    Obviously, I want to keep the custom solutions at a minimum since they would be obsolete once you release the DOTS version.