I’m using the latest stable Phaser 3.24.1.
I guess the bug you’re referring to this issue:
Seems like it might be related to my issue. If I understood how namespaces worked between JavaScript and TypeScript, maybe I could figure it out. If I move everything from matter.d.ts into phaser.d.ts under Phaser.Physics.Matter.Matter - I think I could get it to work - but obviously I shouldn’t have to do that.
Leaving TypeScript out of it for the moment…
This code works in JavaScript:
var velocity = Phaser.Physics.Matter.Matter.Vector.create(4,4);
var speed = Phaser.Physics.Matter.Matter.Vector.magnitude(velocity);
console.log(speed);
But this code does not:
var velocity = MatterJS.Vector.create(4,4);
var speed = MatterJS.Vector.magnitude(velocity);
console.log(speed);
Should it work? Is there an include/import I need to do to make it work?