VitaZheltyakov Posted May 13, 2016 Share Posted May 13, 2016 I finally finished writing the Phaser Arcade Circles plugin. Plugin on GitHub: https://github.com/VitaZheltyakov/phaser-arcade-circles-plugin This plugin adds to framework: Circle vs. Circle collision Circle vs. Rectangle collision Circle-body debug render The plugin does not reduce the performance of arcade physics. The plugin is easy to use. It does not add new functions, but merely extends existing. How to add a plugin: Add to your index.html link to plugin file: <script src="js/phaser-arcade-circles-plugin.js" type="text/javascript"></script> How to use a plugin: Then use the standard function setCircle for the circle-body. sprite1.body.setCircle(radius, offsetX, offsetY); Calculation of the collision produced as usual. No further use is not necessary functions. Note: Remember, this is an arcade physics. Not real physics. Therefore, some collisions may seem strange. Remember, that the setCircle function overrides scaling and anchor point. Examples: The repository has 4 examples of using the plugin. --- If Rachard read this post Richard, I recommend you to add this functionality in the Phaser. DWboutin, askariwa, drhayes and 2 others 5 Link to comment Share on other sites More sharing options...
hexus Posted May 20, 2016 Share Posted May 20, 2016 Sweet plugin! As far as I'm aware, circle body support is being worked on already for newer versions. Check the branches of Phaser's Github repo. VitaZheltyakov 1 Link to comment Share on other sites More sharing options...
VitaZheltyakov Posted May 20, 2016 Author Share Posted May 20, 2016 13 hours ago, hexus said: Sweet plugin! As far as I'm aware, circle body support is being worked on already for newer versions. Check the branches of Phaser's Github repo. Yes, it is being developed. I hope in the next version it will work. Link to comment Share on other sites More sharing options...
Recommended Posts