■ このスレッドは過去ログ倉庫に格納されています
【3Dゲームエンジン】Unity質問スレッド24
- 516 :名前は開発中のものです。:2016/05/21(土) 22:09:09.68 ID:QIEQL/sm.net
- #pragma strict
public var target : Transform;
function Start () {
}
function Update () {
transform.position = target.position;
transform.LookAt(target);
if(Input.GetKey(KeyCode.Q)){
this.transform.Rotate(0,-120*Time.deltaTime,0);
}
if(Input.GetKey(KeyCode.E)){
this.transform.Rotate(0,120*Time.deltaTime,0);
}
if(Input.GetKeyDown(KeyCode.Z)){
this.transform.Rotate(-90,0,0);
}
if(Input.GetKeyDown(KeyCode.X)){
this.transform.Rotate(90,0,0);
}
}
上記のスクリプトをアタッチしたオブジェクトを親にし、子にMainCameraを持たせてキャラクターを追随させようとしたのですが、
キャラクターの細かなブレを読み取ったのか終始カメラがぶれてしまいます。
キャラクターのRigidbodyのisKinematicのチェックを外したらブレは無くなるのですが、キャラクターが他のオブジェクトに力を与えることができなくなってしまいます。
どうすれば解決できるでしょうか
総レス数 1006
312 KB
新着レスの表示
掲示板に戻る
全部
前100
次100
最新50
read.cgi ver.24052200