📜  相机跟随玩家统一流畅 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:12.960000             🧑  作者: Mango

代码示例1
// CAMERA FOLLOW PLAYER - IN FIXEDUPDATE

Vector3.SmoothDamp(cam.position, transform.position + cameraOffset, ref cameraVelocity, CameraFollowSmoothTime);
cam.position = cam.position + cameraVelocity * Time.deltaTime;