Skip to content

Format

typescript
Transform.localPosition

class: Transform

Description

The current position of the Transform relative to its parent Transform.

If the current Transform does not have a parent, it is the same as the local position of the Transform itself.

Parameters

param_nametypedescription

Return

typedescription
Vector3The position of the Transform relative to its parent Transform.

Code Example

typescript
OnStart(): void {
    let local_pos = this.transform.localPosition;
    Debug.Log(local_pos);
    }