Format
typescript
Transform.localPositionclass: 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_name | type | description |
|---|
Return
| type | description |
|---|---|
Vector3 | The position of the Transform relative to its parent Transform. |
Code Example
typescript
OnStart(): void {
let local_pos = this.transform.localPosition;
Debug.Log(local_pos);
}