通过update方法记录变化量然后通过坐标换算移动摄像机 一.获取上一帧到当前帧鼠标位移变化量,计算过相机从上一针位置到当前帧位置移动的距离 /// <summary> /// 计算上一帧到当前帧移动距离 /// </summary> /// <param name="moveDetla"></param> /// <returns></returns> bool isCameraMove(out Vector3 moveDetla) { moveDetla = Vector3.zero; if (Input.GetMouseButtonDown(0)) { setBeginState(); } else if (Input.GetMouseButton(0)) { Debug.DrawLine(cameraRay.origin, cameraRay.origin + cameraRay.direction * 50, Color.red); Vector3 curMousePos = getMouseWorldPos(); Vector3 detla = curMousePos...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with Ray
Contact Ray, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack