[過去ログ] 【3Dゲームエンジン】Unity質問スレッド34 (1002レス)
1-

このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
128
(1): 2018/02/19(月)15:46 ID:LZNQfRtm(3/5) AAS
公式のtransformのrotationのとこにあるサンプルで
public float smooth = 2.0F;
public float tiltAngle = 30.0F;
void Update()
{
float tiltAroundZ = Input.GetAxis("Horizontal") * tiltAngle;
float tiltAroundX = Input.GetAxis("Vertical") * tiltAngle;
Quaternion target = Quaternion.Euler(tiltAroundX, 0, tiltAroundZ);
transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime * smooth);
}
これカメラにアタッチしてやると出来るで
1-
あと 874 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.021s