CameraController插件使用经验

CameraController插件使用经验

 

CameraController,包含多种Motor,可自由切换实现Camera的多样化功能:

官方文档:http://www.ootii.com/Unity/CameraController/CCUsersGuide.pdf

CameraController类 参数说明 :

   Anchor -- 中心点
     (Anchor为空时,找带Tag "Player" 的物体)

     AnchorPosition -- 中心点坐标
     InvertPitch -- 点头转置
     ActiveMotorIndex -- 当前Motor序号
     ActiveMotor -- 当前Motor
     Motors -- Motor列表

  Zoom(视角远近控制):控制 Camera 的 Field of View
    
     ZoomMax -- FOV最大值
     ZoomMin -- FOV最小值
     ZoomSpeed -- 缩放速度
     ZoomSmoothing -- 相机接近物体的平滑度
     ZoomResetOnRelease -- 释放时重置值

     TargetFOV -- 设置Field of View

  EnableMotor():**某Motor


----------------------------------------------------------------

CameraMotor: 可强转为不同类型Motor,实现对应的功能

    RigController -- 父级CameraController(后简称CC)

    Anchor -- 中心点(从CC获取)
    AnchorOffset -- 中心点偏移
    AnchorPosition -- 中心点坐标
    MaxDistance -- 距离中心点最大距离(此处无实体)
    Distance -- 当前距离中心点距离(此处无实体)

----------------------------------------------------------------

YawPitchMotor : CameraMotor
  (Base class that drives the camera using yaw and pitch values)

    MaxDistance -- 距离中心点最大距离
    Distance -- 距离中心点的距离


    IsYawEnabled -- 是否可点头

    LocalYaw -- 本地摇头角度 
        Looking to the anchor's left is < 0f
        // Looking to the anchor's right is > 0f
        // Looking in the direction of the anchor = 0f
        // Looking against the direction of the anchor = 180f

    MinYaw -- 最小值(default = -180 : left)
    MaxYaw -- 最大值(default = 180 : right)
    YawSpeed -- 运动速度(default = 120)


    IsPitchEnabled -- 是否可摇头
    InvertPitch -- 转置

    LocalPitch -- 本地点头角度(read only)
        Pitch of the camera relative to the anchor's forward.
        /// Looking above the anchor (up) is < 0f
        /// Looking below the anchor (down) is > 0f
        /// Looking in the direction of the anchor = 0f

    MinPitch -- 最小值(default = -60 : up)
    MaxPitch -- 最大值(default = 60 : down)
    PitchSpeed -- 运动速度(default = 45)
    
    Smoothing -- 交互平滑参数

    SetTargetYawPitch() -- 设置角度


----------------------------------------------------------------

OrbitFollowMotor : YawPitchMotor
  (3rd Person Follow)

----------------------------------------------------------------

OrbitFixedMotor:
  (3rd Person Fixed)

ViewMotor:
  (1st Person View)

TransitionMotor
  (Transition)

SplineMotor : CameraMotor
  (Spline Motor)

FixedMotor : CameraMotor
  (Fixed Motor)

LookAtTargetMotor
  (Look At Motor)

WorldMotor:
  (Top-Down View Motor)

FreeFlightMotor:
  (Free Flight)