Version: 2022.1
言語: 日本語
public static Quaternion AngleAxis (float angle, Vector3 axis);


axis の周りを angle 度回転する回転を作成します。

For more information see Rotation and Orientation in Unity. The magnitude of the axis parameter is not applied.

using UnityEngine;

public class Example : MonoBehaviour { void Start() { // Sets the transform's current rotation to a new rotation that rotates 30 degrees around the y-axis(Vector3.up) transform.rotation = Quaternion.AngleAxis(30, Vector3.up); } }