Unity 基于Cinemachine的OrbitCameraControl

2023-12-15 11:36:36
using Cinemachine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(CinemachineVirtualCamera))]
public class OrbitCameraControl : MonoBehaviour
{
   
    public Vector3 startPosition;
    public Vector2 startRotation = new Vector2(60, 0);
    public float startDistance = 20;
    [Space]
    public float rotationSpeed = 2f;
    public float rotationDamping = 5f;
    public Vector2 rotationClamp = new Vector2(5, 85);
    [Space]
    public float zoomSpeed = 10f;
    public float zoomDamping = 5f;
    public Vector2 zoomClamp = new 

文章来源:https://blog.csdn.net/u010197227/article/details/135011276
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。