Search Unity

Framing transposer look ahead stops when target stops, does not recenter until target moves again

Discussion in 'Cinemachine' started by Caolan, Sep 12, 2019.

  1. Caolan

    Caolan

    Joined:
    Dec 20, 2012
    Posts:
    16
    Hey, I'm getting some new behavior in a project I recently went back to, and I'm fairly sure it wasn't doing this before. Maybe something has changed?

    The look ahead feature works well, shooting out in front of my follow target, but if my target abruptly stops, so does the framing transposer, it freezes wherever it is, it doesn't snap back to recenter on the stationary target.

    If I move again, however briefly, it then goes back to normal, and snaps back.

    I have attached a screenshot showing where the look ahead freezes, shouldn't this snap back to the now stationary target?
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,845
    What version of CM are you using?
    It's true that the lookahead behaviour was slightly modified in recent versions, to avoid too much bouncing around.
     
    Caolan likes this.
  3. Caolan

    Caolan

    Joined:
    Dec 20, 2012
    Posts:
    16
    I'm on 2.3.4?

    Is this the desired behavior? Pausing off center when the target is stationary? or should it always transpose toward the target's center regardless if they are moving or not? My understanding was that it should always snap to the players center, and when they are in motion, this center is just 'predicted' based on the target's velocity or something.

    In the screen shot I posted, the follow target is the green rat character in the top half of the screen, and this target has fallen down to get to where he is now, pushing the look ahead camera down to focus on the floor where it is stuck in the screenshot, until the target moves again, however briefly.

    This problem also doesn't seem to happen consistently, when running around horizontally, the camera does act as I expect some of the time, and some of the time it does this.

    Are there any obvious ways to have it snap back to the follow target if it is it's off the targets center? Like a method to force it to recenter or something?

    I'll have a look at maybe trying an older version of the package later
     
  4. Caolan

    Caolan

    Joined:
    Dec 20, 2012
    Posts:
    16
    I think the speed and abruptness of the target stopping, might have something to do with the camera getting 'stuck'
     
  5. Caolan

    Caolan

    Joined:
    Dec 20, 2012
    Posts:
    16
    Would setting velocity to Vector2.zero suddenly mess with the look ahead perhaps? I think I've noticed that this seems to happen whenever I am manually setting the rigidbody's velocity.
     
  6. Caolan

    Caolan

    Joined:
    Dec 20, 2012
    Posts:
    16
    I reverted to 2.3.3 and it is back to working as expected! Thanks for the suggestion.