An Interest In:
Web News this Week
- March 22, 2024
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
Bullet Impact Simulation Using Phaser and Matter
Phaser JS is an open source JavaScript game framework for creating 2d HTML5 game. It is shipped with two physics engine: arcade and matter. While arcade is the one used in the official tutorial of phaser and relatively simple (collision, gravity, etc). Matter is a library of its own and can be used for more complex physics involving mass, density, force, friction, etc
Matter has its own documentation, but also has a documentation on Phaser API docs. So understanding how to use it on Phaser is quite challenging for me as for some things you can use the docs at phaser, but for other things, such as the body module, I need to read the matter docs instead. After some struggle, I managed to create a simple simulation of two bodies colliding with a collision detector. I hope it can be helpful for those who want to try making something in phaser using matter engine
Source code with demo link:
https://github.com/RussianMartabak/matter-impact
Original Link: https://dev.to/zaky_abdur/bullet-impact-simulation-using-phaser-and-matter-3a70
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To