谢谢大家了,我刚刚已经自己解决了这个问题,思路是控制每帧转3度,30帧之后使其停止旋转:
如果大家有更好的解决方式,请提供部分程序,我依然会奉上蛮牛币
{:94:}
Frame frame = controller.Frame();
GestureList gestures = frame.Gestures();
for (int i = 0; i < gestures.Count; i++)
{
Gesture gesture = gestures[i];
if (gesture.Type == Gesture.GestureType.TYPESWIPE)
{
SwipeGesture Swipe = new SwipeGesture(gesture);
float swipe = Swipe.Speed;
Vector swipeDirection = Swipe.Direction;
if (swipeDirection.x < 0)
{
print("left");
spinLeft = true;
spinRight = false;
}
else if (swipeDirection.x > 0