问题描述
我想要的是以下内容:
- 我在场景中有一个物体(它永远不会移动)
- 在移动设备上使用 onSwipe 时,相机应围绕对象旋转
- 使用捏(两指放大或缩小)我想放大/缩小场景中的对象
所以我用电影机试了一下,然后用鼠标做了这个。但是我该怎么做才能通过移动输入完成这项工作。
还有我的 CameraController.cs:
if (Input.GetMouseButtonDown(0) || Input.touches.Any(x => x.phase == TouchPhase.Began))// kinda works,but its laggie
{
freeLookComponent.m_XAxis.m_MaxSpeed = 500;
}
if (Input.GetMouseButtonUp(0) || Input.touches.Any(x => x.phase == TouchPhase.Ended))// kinda works,but its laggie
{
freeLookComponent.m_XAxis.m_MaxSpeed = 0;
}
if (Input.mouseScrollDelta.y != 0) //and touch???
{
freeLookComponent.m_YAxis.m_MaxSpeed = 50;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)