Quaternion.operator * 运算符 乘法

static operator * (lhs : Quaternion, rhs : Quaternion) : Quaternion

Description描述

Combines rotations lhs and rhs.

组合旋转lhs和rhs。

Rotating a point first with lhs and then with rhs is the same as rotating the point by the combined rotation. Note that rotations are not commutative: lhs * rhs does not equal to rhs * lhs.

旋转一个点,首先用lhs,然后用rhs旋转,与使用组合旋转相同。注意旋转不可交换: lhs*rhs不等于rhs*lhs.

using UnityEngine;

using System.Collections;



public class example : MonoBehaviour {

	public Transform extraRotation;

	public void Awake() {

		transform.rotation *= extraRotation.rotation;

	}

}
// Applies the rotation of

// extraRotation to the current rotation

//应用extraRotation的旋转给当前旋转

var extraRotation : Transform;

transform.rotation *= extraRotation.rotation;