private void OnMouseDrag()
{
float offsetX = Input.GetAxis("Mouse X");
float offsetY = Input.GetAxis("Mouse Y");
transform.Rotate(new Vector3(offsetY, -offsetX, 0) * 10,Space.World);
}
private void OnMouseDrag()
{
float offsetX = Input.GetAxis("Mouse X");
float offsetY = Input.GetAxis("Mouse Y");
transform.Rotate(new Vector3(offsetY, -offsetX, 0) * 10,Space.World);
}
本文标题:unity 拖动物体旋转
本文链接:https://www.haomeiwen.com/subject/etbwhktx.html
网友评论