【3Dゲームエンジン】Unity質問スレッド10at GAMEDEV【3Dゲームエンジン】Unity質問スレッド10 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト400:名前は開発中のものです。 14/07/10 03:37:17.91 xx5UL/cu.net AというオブジェクトのTransform(ポジションとローテーション)を BというオブジェクトのTransformに近づけていくのに簡潔な書き方ってないでしょうか 下記のように書いたんですが float x = Mathf.Lerp(A.transform.position.x, B.transform.position.x, t);. float y = Mathf.Lerp(A.transform.position.y, B.transform.position.y, t);. float z = Mathf.Lerp(A.transform.position.z, B.transform.position.z, t);. float rotationX = Mathf.Lerp(A.transform.rotarion.x, B.transform.rotarion.x, t);. float rotationY = Mathf.Lerp(A.transform.rotarion.y, B.transform.rotarion.y, t);. float rotationZ = Mathf.Lerp(A.transform.rotarion.z, B.transform.rotarion.z, t);. A.transform.position=new Vector3(x,y,z); B.transform.rotation=new Vector3(rotationX,rotationY,rotationZ); これだとちょっと冗長すぎて、もっと簡潔な書き方があると思えてなりません どなたかアドバイス願えますでしょうか 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch