Jump to content

Collision calculations differency


kurhlaa
 Share

Recommended Posts

Hi,

I have a question about different collisions calculations methods. I'm not sure how to test it by myself, so I wish to hear people with more deep knowledge of Phaser's internals.

Imagine a tileMap, 1 ground layer, 10 moving objects with collisions enabled. The standard way to init collisions is:

scene.physics.add.collider(target, groundLayer);

.. here target can be a single object or a group of objects.

So my question is - what is more efficient:

  1. 1 collider for every object (10 colliders in total) or
  2. Create a group of all 10 objects and only 1 common collider "group to group"
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...