diff --git a/cocos/scene-graph/node.ts b/cocos/scene-graph/node.ts index eefcc3563c..cd55529208 100644 --- a/cocos/scene-graph/node.ts +++ b/cocos/scene-graph/node.ts @@ -432,6 +432,10 @@ class Node extends BaseNode { } } + public get localPosition (): Readonly { + return this._lpos; + } + /** * Sets local rotation. * @param rotation - The new local rotation. @@ -489,6 +493,10 @@ class Node extends BaseNode { } } + public get localRotation (): Readonly { + return this._lrot; + } + /** * Sets local scale. * @param scale - The new local scale. @@ -534,6 +542,10 @@ class Node extends BaseNode { } } + public get localScale (): Readonly { + return this._lscale; + } + /** * Sets world position. * @param position - The new world position. @@ -593,6 +605,11 @@ class Node extends BaseNode { } } + public get worldPosition (): Readonly { + this.updateWorldTransform(); + return this._pos; + } + /** * Sets world rotation. * @param rotation - The new world rotation. @@ -672,6 +689,11 @@ class Node extends BaseNode { } } + public get worldRotation (): Readonly { + this.updateWorldTransform(); + return this._rot; + } + /** * Sets world scale. * @param scale - The new world scale. @@ -727,6 +749,11 @@ class Node extends BaseNode { } } + public get worldScale (): Readonly { + this.updateWorldTransform(); + return this._scale; + } + public getWorldMatrix (out?: Out): Out; public getWorldMatrix (): Mat4;