using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Move : MonoBehaviour
{
private Vector2 offs;
public float speed = 2;
void Start()
{
offs = transform.eulerAngles;
}
void Update()
{
if (Input.GetMouseButton(1)) //用户交互的键入
{
offs += -new Vector2(Input.GetAxis("Mouse Y"), -Input.GetAxis("Mouse X")) * speed; //摄像机旋转的控制
transform.eulerAngles = offs;
}
}
}
Move
最新推荐文章于 2024-05-27 16:14:39 发布