【ゲームエンジン】Unity初心者質問スレBuild3at GAMEDEV
【ゲームエンジン】Unity初心者質問スレBuild3 - 暇つぶし2ch26:名前は開発中のものです。
20/01/13 13:00:01.95 auL79zSW.net
>>21
単純にUnityのこと理解してないと思うんだけど
現在位置からターゲットに向ける用途的にはLerpでなくTowards使うんだぜ
transform.position = Vector3.MoveTowards(transform.position, target.position, moveSpeed * Time.deltaTime);
if(transform.position == target.position) // 移動完了処理
transform.rotation = Quaternion.RotateTowards(transform.rotation, target.rotation, rotSpeed * Time.deltaTime);
if(transform.rotation == target.rotation) // 回転完了処理


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch