Jump to content

Interactive arc graphics


Recommended Posts


I`d like to create an interactive graphics with arc.

var arcGraphics = new PIXI.Graphics();
arcGraphics.lineStyle(30, 0x000000);
arcGraphics.arc(300, 300, 60, 0, Math.PI * 2 / 8);

Using hitArea = arcGraphics.getBounds(), the interactive area and the arc will be too different.

If I use this graphics as a texture of a sprite, the position of the sprite will be different from the original graphics, even if I set the position to (300, 300). How can I position my sprite correctly? Or is there a better way for interactive arc?

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.

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.


  • Recently Browsing   0 members

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