private void rotateByTouchMove()
{
if(Input.touchCount>0 && Input.touches[0].phase == TouchPhase.Moved)
{
Vector2 touchDeltaPosition = Input.GetTouch(0).deltaPosition;
transform.Rotate(0,touchDeltaPosition.x,0);
}
}
Unity手指滑动让物体旋转
最新推荐文章于 2024-07-29 21:53:30 发布