Search Unity

Question Framing Transposer and Group Composer Rotation Issues

Discussion in 'Cinemachine' started by Kurteth, Sep 15, 2022.

  1. Kurteth

    Kurteth

    Joined:
    Aug 7, 2018
    Posts:
    15
    I am sure this question has been asked many times before, but I can't seem to find one that was successfully answered. Forgive me for I'm a newbie when it comes to all this.

    I am currently using a Virtual Camera for my game as a third person camera with a lock on system.I use a free orbit camera until I lock on, and then switch to a second camera.

    For my Body, I am using the Framing Transposer.

    upload_2022-9-15_4-15-2.png



    For the Aim, I am using Group Composer (The target is blank during non play state, but fills in when a Look at Target exists)

    upload_2022-9-15_4-15-19.png


    This has been working great!...Most of the time. When the targets are far away everything is as intended. However, when the target approaches the player, the camera continues to try and keep both in frame and begins circling at an alarmingly fast rate, rotating around and generally looking broken.

    The solution I've come up with is when the target is within a certain distance, switch to a third camera, but I cannot figure out what settings would keep both in frame without A: spinning. Or B: removing the entire point of the lock on.

    Is there any advice anyone has? Thank you in advance, I'm pretty lost on this.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    This is really something of an artistic and gameplay choice. First you have to decide what you want the camera to do when the characters are very close to each other - what instructions would you give a cameraman trying to capture the interplay of the characters? Can you describe it in words? A video of the situation would also help.

    Once you know what you want the camera to do, we can help you figure out how to achieve it in Cinemachine. Switching to a specialized camera is a good idea.
     
  3. Kurteth

    Kurteth

    Joined:
    Aug 7, 2018
    Posts:
    15
    Thanks for taking the time to respond! I really appreciate it.

    So, I have 3 cameras. 1: Freelook/orbit. 2: Lock on far. 3: Lock on close.

    In camera 2, the framing is so that the player is in the bottom left of the screen, and the target is in the top right, framing a "looking over the shoulder" shot.

    When it switches to camera 3 at X distance, I would love for it to dolly (I think that's the correct term?) to the left, so that the player is in front of the camera, directly centered but in the lower half of the frame. And the target is also center, but in the upper half. I would love for the camera to zoom out slightly, and have a set Y limit, so that it cannot try and frame them from above. It has to be more level with the horizontal ground.

    Question: How would you stop the camera from orbiting around from above, and instead stay behind the player? Low enough so it doesn't go over head.


    My other worry, is if the target gets very close, and then moves BEHIND the player, the camera will SNAP behind the player incredibly fast. Is there a way to slow down how fast the camera moves, but only when moving <90 degrees?

    Thank you again.
     
    Last edited: Sep 15, 2022
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    @Kurteth Sorry for the long delay, this thread dropped off my radar and I've only just rediscovered it. Have you solved the issue?
     
  5. JohnnyConnor

    JohnnyConnor

    Joined:
    Aug 10, 2020
    Posts:
    42
    I was trying to solve this problem for days and I finally found something that worked.
    I don't know why, but inputting your TargetGroup into a Composer (not a Group Composer) makes the camera work as expected.