Jump to content

How can get plygon from sprite?


Shima_Max
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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