Unity - A计划(永久有效期) 扫二维码继续学习 二维码时效为半小时

(197评价)
价格: 4431.00元
DORotate不能用
osdfjwekoj发起了问答2021-05-27
2
回复
817
浏览
 private Transform mainCamera;
    

    private void Start()
    {
        mainCamera = transform;
    }

    public void OnAreaButtonClicked()
    {
        mainCamera.DOMove(areaCameraPositon.position, 1);
        mainCamera.DORotate(areaCameraPositon.rotation, 1);
        
        print("Clicked");
        
    }

错误信息:Assets\Scripts\Camera\MainCameraControl.cs(20,9): error CS1929: 'Transform' does not contain a definition for 'DORotate' and the best extension method overload 'ShortcutExtensions.DORotate(Rigidbody, Vector3, float, RotateMode)' requires a receiver of type 'Rigidbody'

domove运行正常,rotate报错

所有回复
发表回复
你还没有登录,请先 登录或 注册!