Shima_Max Posted April 4, 2019 Share Posted April 4, 2019 Hi, I want to detect collision between two sprites. So, as I understood, it means that I should detect collision between two polygons. How I can get sprite edge points? Or maybe another way exists? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 4, 2019 Share Posted April 4, 2019 Usually I use https://www.codeandweb.com/physicseditor , load that json to pixi, create special objects that have several polygons inside and containsPoint()/contains() function ( I DONT REMEMBER) that checks every polygon. Its never a plugin or boxed solution because I adjust many things based on the game conditions. Its possible to map file names to content inside "shapes.json" , its very easy. Then you can specify it as a hitArea for sprite or use it as an input for physics engine for physics component of pixi object. Again, pixi doesnt have that in vanilla, it has to be part of your engine on top of pixi. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.