Replies: 3 comments
-
It's merged 😄 after it goes live you can do stuff like
For more complicated collision, you need SAT (separating axis theorem) and that wouldn't include complex or concave shapes, so you need triangulation (teselation) first... and your complexity escalates 😬 |
Beta Was this translation helpful? Give feedback.
-
Thanks @Ayfri for the suggestion. Aside from what @miltoncandelero suggested, anything more involved will collision detection is outside of the scope of Pixi and we don't plan to address. Pixi is not a game library or framework. We've been very intentional to keep it constrained to rendering as much as possible. Other suggestions welcomed. Will transfer this to a discussion. |
Beta Was this translation helpful? Give feedback.
-
@miltoncandelero shameless plug, but I've been maintaining pure 2d collision modules which support a lot of aabb and line segment type collisions: You'll find that these are very opinionated though. Maybe they will be useful. |
Beta Was this translation helpful? Give feedback.
-
PIXI is great for making web games, but there are no methods in the library to test collision between two sprites or two rectangles. It's not difficult to create a function for testing collision between simple AABB but with
anchor
,pivot
,rotation
andscew
it's a bit more complicated and having something very optimised is not very easy with all these properties.So I think that
DisplayObject
class or justRectangle
should have methods for testing collisions, and maybe have methods to get the offsets and the center of the collision.Beta Was this translation helpful? Give feedback.
All reactions