Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Look ahead smoothing works in Editor, but not in build

Discussion in 'Cinemachine' started by verity147, Dec 18, 2019.

  1. verity147

    verity147

    Joined:
    Jun 22, 2017
    Posts:
    7
    Hello,
    I have tried this behaviour on Unity 2019.3.0b1 with Cinemachine 2.3.4 and on Unity 2019.3.0f3 with Cinemachine 2.3.4 and 2.4 preview 10.

    I have a platformer game with a cinemachine virtual camera following the player with Look ahead, smoothing set at the max(30). It works like a charm in the engine but the smoothing seems to be turned off or at most something like a value of 5 (hard to gauge) in an actual build.
    Do you have any insight on this, is there something I need to enable to also have it in a built game?

    I have my virtual camera settings attached, tell me if you need to know something else.
     

    Attached Files:

  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Interesting. I wonder whether it's framerate-related. What are the framerates of the build and the editor?
     
    doarp likes this.
  3. verity147

    verity147

    Joined:
    Jun 22, 2017
    Posts:
    7
    Thank you so much for getting back to me. You hit the nail on the head, the build ran at about 2000fps, in editor was about 200 (still stupid for this game). I had not realized that my quality settings were quite messed up. Smoothing works as it should now.
     
  4. frostymm

    frostymm

    Joined:
    Jun 21, 2013
    Posts:
    34
    I'm also having issues with this, after removing the frame-rate cap on my game, the camera just slams around whenever my character gets any kind of speed boost!
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    Yes, the lookahead is sensitive to framerate. Best to keep that cap on.
     
  6. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    2018.4. In editor Cinemachine Lookahead works beautifully. In a build the camera shoots off into space.
     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,658
    CM 2.6 (available now in preview) has improved lookahead logic. You might want to give that a try.
     
    JamesArndt likes this.