标签:pos sys space form return tor down public world
using UnityEngine;
using System.Collections;
public class RotaRole : MonoBehaviour
{
public Vector3 mousePos;
IEnumerator OnMouseDown()
{
mousePos = Input.mousePosition;
while (Input.GetMouseButton(0))
{
Vector3 offset = mousePos - Input.mousePosition;
transform.Rotate(Vector3.up * offset.x, Space.World);
//transform.Rotate(Vector3.right * offset.y, Space.World);
mousePos = Input.mousePosition;
yield return null;
}
}
}
标签:pos sys space form return tor down public world
原文地址:http://www.cnblogs.com/lovesharing/p/6377603.html