android unity 3d中的球粘在侧壁上?
我尝试在android设备上运行roll游戏Unity 3d示例,球粘在侧壁上,当球与侧壁接触时,球移动非常缓慢。你能帮我解决这个问题吗 这是我的球移动加速度计代码android unity 3d中的球粘在侧壁上?,android,unity3d,accelerometer,unityscript,Android,Unity3d,Accelerometer,Unityscript,我尝试在android设备上运行roll游戏Unity 3d示例,球粘在侧壁上,当球与侧壁接触时,球移动非常缓慢。你能帮我解决这个问题吗 这是我的球移动加速度计代码 Screen.sleepTimeout = SleepTimeout.NeverSleep; curAc = Vector3.Lerp(curAc, Input.acceleration-zeroAc, Time.deltaTime/smooth); GetAxisV = Mathf.Clamp(curAc.y * sensV,
Screen.sleepTimeout = SleepTimeout.NeverSleep;
curAc = Vector3.Lerp(curAc, Input.acceleration-zeroAc, Time.deltaTime/smooth);
GetAxisV = Mathf.Clamp(curAc.y * sensV, -1, 2);
GetAxisH = Mathf.Clamp(curAc.x * sensH, -1, 2);
Vector3 movement = new Vector3 (GetAxisH, 0.0f, GetAxisV);
rigidbody.AddForce(movement * speedAc*2f);
提前感谢我在制作弹球游戏时遇到了类似的问题。我没有使用加速度计,但球的行为是非常相同的 只需查看yout对象的列表。必须检查球、墙壁和任何一层。因为我不知道你正在构建什么样的游戏,我建议你尝试一下每个参数