Search Unity

Need Help With Free Look Camera for Flying Object

Discussion in 'Cinemachine' started by Berserker44, Jan 23, 2019.

  1. Berserker44

    Berserker44

    Joined:
    Sep 1, 2013
    Posts:
    29
    Hello,

    I am trying to use the Freelook Camera for my flying player. Attached is the video below with something that I currently have been messing around for a few hours. I just want a simple camera that can rotate 360 degrees around the player evenly , Something similar to how the old unity free-look script worked. However I am having difficulties getting it to work the way I want it to. It behaves unpredictably, especially when the player is moving at higher speeds. When the player is moving fast it looks like the Camera is zooming in.

    Can anyone with experience with this camera point me in the right direction or show me how I can get the free look camera to work properly? The main issue is having the Camera rotate around the player uniformly, so any help with that would be great.

     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,717
    The problem is damping. If you turn all the Body damping to zero then the FreeLook will rotate evenly around. The point of damping is to introduce latency: the camera rotates around the point where the target was a moment ago. So if the target is moving fast, you will get the effect you are seeing.

    A possible solution could be to add a script to control damping and orbit radii dynamically: at low speed high damping and smaller radii, at high speeds no damping and larger radii.