指北针复位摄像机旋转问题
unity 摄像机绕某个点旋转,直到镜头指向项目中的北方,摄像机停止旋转,摄像机需要旋转需要平滑停止(逐渐停止)
直接用LeanTween插件的rotate方法
dotween也可以
///
/// 围绕某点旋转指定角度
/// /// 自身坐标
/// 旋转中心
/// 围绕旋转轴
/// 旋转角度
/// public Vector3 RotateRound(Vector3 position, Vector3 center, Vector3 axis, float angle) { return Quaternion.AngleAxis(angle, axis) * (position - center) + center; }试一下行不行