By Josh Morony
A while ago I wrote a bit of a summary of the different physics system in Phaser, which covered a little bit about how they work and I also followed that up a little later with a more in-depth tutorial on using the Ninja physics system.
To save you having to read the entire article, the three physics systems are: Arcade, Ninja and P2. Arcade is the most commonly used and has support for basic physics and collisions (gravity, velocity, acceleration), P2 is much more advanced and supports complex physics and collisions (springs, joints and so on). Ninja is sort of this awkward in between system that I don’t think is really being supported.
I use the Arcade system for just about every game I create, but the biggest downfall is that it only supports AABB or rectangle vs rectangle collisions. What this basically means is that the hit areas for your sprites have to be boxes, they can’t be circles or triangles or anything else.
0 comments :
Post a Comment