Hello.
How to make a shooting cannon in matterjs like in this arcade physics example:
https://labs.phaser.io/view.html?src=src/physics/arcade/velocity%20from%20angle.js
I need the equivalent of the arcade “velocityFromRotation” method.
Thanks
Greg
Hello.
How to make a shooting cannon in matterjs like in this arcade physics example:
https://labs.phaser.io/view.html?src=src/physics/arcade/velocity%20from%20angle.js
I need the equivalent of the arcade “velocityFromRotation” method.
Thanks
Greg
const launch = new Phaser.Math.Vector2();
launch.setToPolar(angle, speed);
matterSprite.setVelocity(launch.x, launch.y);