Version: 5.3 (switch to 5.4b)
言語English
  • C#
  • JS

スクリプト言語

好きな言語を選択してください。選択した言語でスクリプトコードが表示されます。

Transform.RotateAround

マニュアルに切り替える
public void RotateAround(Vector3 point, Vector3 axis, float angle);

パラメーター

説明

ワールド座標の point を中心とした軸( axis )で angle 度回転させます

これは Transform の位置と回転が同時に変更されます。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Update() { transform.RotateAround(Vector3.zero, Vector3.up, 20 * Time.deltaTime); } }