#7388·phaser

Container.getWorldPoint() / getLocalPoint() throw "tempMatrix.applyITRS is not a function" in 4.2.1

Author: DreadKnightCreated Sep 29, 2026Updated Sep 29, 2026

Description:

Phaser 4.2.1: Calling container.getWorldPoint(x, y) or container.getLocalPoint(x, y) throws: TypeError: tempMatrix.applyITRS is not a function at Container.getWorldTransformMatrix (Transform.js:517) at Container.getWorldPoint (Transform.js:627) at Container.getLocalPoint (Transform.js:584)

Root cause: getWorldTransformMatrix() creates new TransformMatrix() but the instance lacks applyITRS at runtime (method exists in source but not on constructed object).

Minimal reproduction:

javascript
const container = scene.add.container(100, 100);
const sprite = scene.add.sprite(50, 50, 'key');
container.add(sprite);
container.getWorldPoint(0, 0);  // throws
// or
container.getLocalPoint(200, 200);  // throws

Environment: Phaser 4.2.1, WebGL renderer, TypeScript project, OS: Kubuntu

Workaround: Manual transform walking up parentContainer chain See getWorldPointManual/getLocalPointManual in this commit: https://github.com/FreezingMoon/AncientBeast/commit/516f4b41