unity摄像机跟随

正在制作第三人称摄像机跟随,做完之后在运行的时候鼠标消失了
{

    public float mouseSensitivity;  // 鼠标灵敏度
    public Transform top;

    public void Start()
    {
        top = transform.parent;
        Cursor.lockState = CursorLockMode.Locked;   //鼠标固定在中间
        
    }

    public void Update()
    {
        Rotate();
    }

    public void Rotate()
    {
        float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime;    //鼠标移动值
        
        top.Rotate(Vector3.up,mouseX);
    }
}


因为要控制人物点击按钮所以需要鼠标显示

既然鼠标是锁定到屏幕中间的,那为什么不在屏幕中心做一个点当标识呢

实现第三人称或者第一人称相机跟随,建议参考文章:https://blog.csdn.net/zhangay1998/article/details/116234987