slice Posted October 3, 2018 Share Posted October 3, 2018 Hi, 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? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted October 3, 2018 Share Posted October 3, 2018 You have to adjust sprite anchor, make it something like "anchor.x = - bounds.x / generatedTexture.width" 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.