Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback Make Composer's Lookahead and damping axis relative to Cinemachine Path

Discussion in 'Cinemachine' started by LezCT, Dec 4, 2021.

  1. LezCT

    LezCT

    Joined:
    Nov 15, 2014
    Posts:
    55
    I'm using cinemachine for a 2.5D sidescroller project (similar to Klonoa) with cinemachine tracked dolly path, but I can't use the aim component like composer and group composer properly because it damps in world space, which is fine for almost every game, but a bit disorienting if used for 2.5D sidescrollers like in my project. I figured the possible solution is to align the damp and lookahead axis to the tracked dolly's axis instead of the world space, but I'm not sure how hard it is to implement as an option.
    For reference, here's a short clip comparing the vcam with and without aiming component.

    While the game does look ok without an aiming component, I wish to make use of cinemachine's aiming components (especially group composer and lookahead) without them making weird damping.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,233
    I'm having a little difficulty understanding your issue. Composer lookahead considers the direction of motion of the target and projects it forward in time. If the target is moving along the green path, then the lookahead will be tangent to the green path. Isn't that what you want? Composer damping also is in camera-relative coords, not worldspace.

    One option for people who want a camera behaviour that's not covered out of the box by Cinemachine is to create an invisible target proxy to help control the cameras. Use that as a target, and move it where you want the camera to point. Then let Cinemachine's damping smooth it all out.
     
  3. LezCT

    LezCT

    Joined:
    Nov 15, 2014
    Posts:
    55
    I guess I still don't understand how the virtual camera works.
    I just want to use composer on my setup without the camera swaying like on the video. It's especially noticeable when the player turns around. I think it does that little swaying because the body and aim damping are not syncing.

    I'll just try to write a cinemachine extension to handle the custom aiming. In my project, the camera aiming up a bit when the character is on top of the screen is nice, and I thought composer would be enough for that, but it has caveats on my current setup.
     
    Last edited: Dec 4, 2021