【3Dゲームエンジン】Unity質問スレッド17at GAMEDEV【3Dゲームエンジン】Unity質問スレッド17 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト1015:{ //start Start rigid = GetComponent<Rigidbody>(); player = GameObject.FindWithTag ("Player"); //end Start } void FixedUpdate() { //start FixedUpdate if(rigid.velocity.magnitude<maxSpeed && !Input.GetKey("space") )rigid.AddForce(transform.forward*sppedForce); //end FixedUpdate } void Update () { //start Update float smoothTime = 5f; Vector3 wantedVector; wantedVector = player.transform.position-transform.position;/*操作できるやつ= new Vector3(Input.GetAxis ("Horizontal"),0,1);*/ Quaternion wantedRotation = Quaternion.LookRotation(wantedVector); //transform.rotation = Quaternion.Slerp(transform.rotation,wantedRotation,smoothTime * Time.deltaTime); transform.rotation = Quaternion.Lerp(transform.rotation,wantedRotation,smoothTime * Time.deltaTime); //end Update } 公式のsmoothCameraを参考にしていましたがおかしかったのですか。 全オブジェクトのUpdateのあとにLateUpdateが呼び出されるのでfreeCameraをLateで呼び出せばいいんですよね。 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch