Skip to content

格式

typescript
Transform.up

所属类: Transform

描述

(只读)游戏对象在世界空间Transform的Y轴正方向的单位向量。

旋转游戏对象时,该值也会改变方向。

参数

参数名类型描述

返回值

类型描述
Vector3Y轴正方向的单位向量

代码示例

typescript
OnStart(): void {
    let up = this.transform.up;
    }