Search Unity

Question Can I set a range for Cinemachine Free Look camera?

Discussion in 'Cinemachine' started by Lex_212, Jan 20, 2023.

  1. Lex_212

    Lex_212

    Joined:
    Oct 3, 2020
    Posts:
    84
    Hi, I am using the Free Look camera for my game and I would want the player to not be able to make a full rotation, I would want to put a range where the player can move the camera (for example: form 90º-180º on the x axis)
    Is there a way to do that?
    Thanks.
     
  2. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Unfortunately the Freelook camera does not have a clamping function to do what you need (we are fixing this). Depending on your use case, you might be able to get away with a regular Virtual Camera using the Framing Transposer and POV. This has a Value Range option to do what you're after. See the attached image.

    Hope that helps!
     

    Attached Files:

  3. Lex_212

    Lex_212

    Joined:
    Oct 3, 2020
    Posts:
    84
    Thanks! I will try if I can use the virtual camera for my game