跳到主要内容

Camera3D

描述:

  游戏引擎中的 3D 相机对象类。

继承自:Camera

position

类型: 成员变量。

描述:

  相机位置。

签名:

position: Vec3

target

类型: 成员变量。

描述:

  相机目标点。

签名:

target: Vec3

up

类型: 成员变量。

描述:

  相机向上方向。

签名:

up: Vec3

lookAt

类型: 函数。

描述:

  设置相机位置、目标点和向上方向。

签名:

lookAt: function(self: Camera3D, position: Vec3, target: Vec3, up?: Vec3)

参数:

参数名类型描述
positionVec3相机位置。
targetVec3相机目标点。
upVec3[可选] 相机向上方向。默认是 Vec3(0, 1, 0)。