Search Unity

Question Camera controls like Trip's Voyage

Discussion in 'Cinemachine' started by Zombiehunternr1, Jan 3, 2023.

  1. Zombiehunternr1

    Zombiehunternr1

    Joined:
    Feb 14, 2019
    Posts:
    2
    Hi everyone,

    I recently decided that I wanted to make my own 3D platform game in Unity and decided to make a small demo project to figure out certain techniques like movement, interacting, dialogue, cameras, etc. I don't know if this is important to know but just in case, the Unity Editor version that I'm currently using is 2021.3.15f.

    I'm currently experimenting with the "old" cinemachine 2.0 version for trying to get the camera movement the same as my inspiration game Trip's Voyage.

    In my project I've also implemented the new Unity Input System for controlling the camera rotation. I've got the smooth rotation working, so the player can use the right joystick on the game pad to rotate the camera 360 degrees on the X-axis. I'm using a Free Look Camera to make this all work.

    The problem I'm currently having is that I don't know how to make the camera follow my players character as in my inspiration game Trip's Voyage. Currently, my camera moves directly along with the player the moment the player moves. I want to be able to build in a small "barrier" that prevents the camera from doing that till a certain point where the player is almost out of view, so the camera repositions itself. I thought I had to do something with the vertical/horizontal damping, dead zones or soft zones, but nothing seems to be working for me. This is what I've managed to get so far with this project.


    This is the end result I'm trying to reach.


    An important note is that this project is in the very early stages of development where I'm still just figuring out the tech I want to use and implement to my project.

    Also, if it is maybe smarter to wait a bit for Unity 2022.2.2 official to use Cinemachine 3.0 let me know as well, because then I'll wait with further developing the camera system.
     
  2. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    That should work in most cases. What setup did you try?

    I took a quick look-see at the game, and I'd use a Freelook camera (with vertical damping, bit of soft zone and dead zone, and Bias Y set so that deadzone only affects upward motion). With some additional special cameras that active using a trigger volume (e.g. when Trip opens the treasure chest).

    You can already get access to 2022.2 and CM 3. Since you are early in development process, I would advise you to use CM 3, but it is a pre-release, so there may be some changes coming in the future.
     
    Last edited: Jan 9, 2023
  3. Zombiehunternr1

    Zombiehunternr1

    Joined:
    Feb 14, 2019
    Posts:
    2
    I've managed to get CM 3 into my project by first upgrading it again to 2023 alpha and then downgrade it to 2022.2. (Don't understand why I couldn't install it directly from the package manager in 2022.2, but I've got it at least).

    I'll try to implement the adjustments that you've mentioned and I'll let you know if I got it to work or that I'm struggling with some elements.
     
    Last edited: Jan 4, 2023
    gaborkb likes this.
  4. gaborkb

    gaborkb

    Unity Technologies

    Joined:
    Nov 7, 2019
    Posts:
    856
    Unity editors have some package versions tied to them, so some versions don't show up unfortunately. But you can manually edit the package manifest (in your project folder, Packages -> manifest.json) to set the version.