0
function LateUpdate() {
if (isCameraInputIgnored()) {
return;
}
if (target && Input.GetMouseButton(0)) {
x += Input.GetAxis("Mouse X") * xSpeed * 0.02;
y -= Input.GetAxis("Mouse Y") * ySpeed * 0.02;
y = ClampAngle(y, yMinLimit, yMaxLimit);
var rotation = Quaternion.Euler(y, x, 0);
var position = rotation * Vector3(0.0, 10.0, -distance) + target.position;
transform.rotation = rotation;
transform.position = position;
}
}
这是旋转我的对象的函数。当我点击播放并点击鼠标(无论我在屏幕上的哪个位置),我的相机正在通过设置改变它的位置。任何想法如何阻止?相机在鼠标轨道上移动
我加2张给的细节。我希望了解我的问题。