Skip to content

Format

typescript
Transform.forward

class: Transform

Description

(Read Only) The unit vector in the positive Z direction in world space for the game object.

This value also changes direction when the game object is rotated.

Parameters

param_nametypedescription

Return

typedescription
Vector3The unit vector in the positive Z direction.

Code Example

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