Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Collision transparent areas.


not-superman
 Share

Recommended Posts

To shrink the collision body size in ARCADE use this line:

 

player.body.setSize(width, height, x, y);

 

You can set the collision body size for each animation that way. But for each frame... I don't know.

 

I like the P2 physics polygons.  :) Looks very accurate. Almost pixel perfect. However, isn't that heavy on the processor? To constantly check if a bunch of polygons are colliding with other things? Or it's not that much of a deal since the sprite's collision body is divided in many polygons and it's not just one big shape following its contours? (I am looking at the example link from tips4design).

Link to comment
Share on other sites

Well, polygon collision each much better than checking each pixel of the image individually...

 

Another think you could do is (I don't know if it's possible in ARCADE) to add multiple square bodies to a single sprite, so you have like 4-5 overlapping rectangles that better match the actual shape of your sprite.

How to add?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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