Search Unity

Question The camera position is completing over multiple update. when using framing transposer with composer

Discussion in 'Cinemachine' started by jusias85, Apr 26, 2023.

  1. jusias85

    jusias85

    Joined:
    Jul 12, 2022
    Posts:
    2
    When using Framing Transposer and Composer together in a CinemachineCamera, the position and direction will change over multiple frames when Cinemachine is activated, even if all damping is set to 0 and Blend Type is set to cut.
    Even when using the ManualUpdate function, the result will not change due to the status.lastUpdateDeltaTime in the Core.
    I would like to know how to immediately move to the final position.
    I am using Cinemachine version 2.8.9.
    Thank you

     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    There is no way to do that with the Composer/FramingTransposer combination. It's a feedback loop that takes several frames to resolve. Other Body/Aim combinations can be used if you need the possibility of instant placement.
     
  3. jusias85

    jusias85

    Joined:
    Jul 12, 2022
    Posts:
    2
    Thank you for your response.

    To use the functionality where the Body and Aim can be positioned relative to the screen, the Framing Transposer/Composer needed to be used.

    When blending two VirtualCameras, if the LookAt distance is far, the rotation range becomes larger, causing the camera target to go off-screen. To prevent this, an attempt was made to artificially reduce the rotation range by generating a dummy 3D coordinate closer to the screen at the same location as the final VirtualCamera.


    In this situation like the one in the video, is there a way to perform the blend so that the Cube doesn't go off-screen, or to customize the blend path?
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    There are ways to influence the blend, primarily by using BlendHints.

    In general, CM blends will keep the LookAt point on-screen. If the LookAt point is not the same for both cameras, then it will be lerped from one position to the other, and that lerped position will be kept on screen.

    It's possible to disable that logic and make the camera simply slerp to the new angle.

    Thanks for the video, but I don't really understand what I'm looking at or what I'm supposed to conclude from it. If you would like to send me the test project, I can take a closer look.