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:
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: FreezingMoon/AncientBeast@516f4b41
Description:
Phaser 4.2.1: Calling
container.getWorldPoint(x, y)orcontainer.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()createsnew TransformMatrix()but the instance lacksapplyITRSat runtime (method exists in source but not on constructed object).Minimal reproduction:
Environment: Phaser 4.2.1, WebGL renderer, TypeScript project, OS: Kubuntu
Workaround: Manual transform walking up parentContainer chain
See getWorldPointManual/getLocalPointManual in this commit: FreezingMoon/AncientBeast@516f4b41