创建朝目标方向看过去的旋转量。

数学
Both Server and Client
Both Mobile and PC

创建一个朝向指定方向的旋转四元数

声明

func LookRotation(forward Vector3, upward Vector3) Quaternion
go

参数

输入

名称 类型 描述
朝向 Vector3 指定方向
正上方对应的方向 Vector3 上方方向

返回

类型 描述
Quaternion 朝指定方向对齐所需要的旋转量