Unity3d LookAt参数说明
//
// 摘要:
// Rotates the transform so the forward vector points at target's current position.
//
// 参数:
// target:
// Object to point towards.
//
// worldUp:
// Vector specifying the upward direction.
public void LookAt(Transform target, Vector3 worldUp);
其中 target为朝向的目标,worldUp为对象朝向目标后旋转自身,使得worldUp垂直z轴向上;
transform.LookAt(target,transform.right);
transform.LookAt(target,-transform.right);
transform.LookAt(target,transform.up);
transform.LookAt(target,-transform.up);