Alex_Matveev Posted May 15, 2015 Share Posted May 15, 2015 How use hitTest in V3 Quote Link to comment Share on other sites More sharing options...
xerver Posted May 15, 2015 Share Posted May 15, 2015 Sprites have a containsPoint method that you can use to cehck if a point is within the sprite's bounding box, is that you are looking for? Quote Link to comment Share on other sites More sharing options...
Alex_Matveev Posted May 16, 2015 Author Share Posted May 16, 2015 Yes. Thanks Quote Link to comment Share on other sites More sharing options...
dcarlos Posted August 18, 2015 Share Posted August 18, 2015 Is there currently a bug in the containsPoint method? It is always returning false for me. Quote Link to comment Share on other sites More sharing options...
caymanbruce Posted January 6, 2017 Share Posted January 6, 2017 On 8/19/2015 at 4:56 AM, dcarlos said: Is there currently a bug in the containsPoint method? It is always returning false for me. Same here, in PIXI v4. I don't understand. the containsPoint method has no effect when my sprite moves with a camera. Quote Link to comment Share on other sites More sharing options...
PixelPicoSean Posted January 6, 2017 Share Posted January 6, 2017 I think you've misunderstand the "containsPoint" method, which is actually a callback for you to manually check whether the input (either mouse or touch) is inside a Container/Sprite. Try contains method of PIXI shape objects if you want to test whether a point is inside. Quote Link to comment Share on other sites More sharing options...
caymanbruce Posted January 7, 2017 Share Posted January 7, 2017 6 hours ago, PixelPicoSean said: I think you've misunderstand the "containsPoint" method, which is actually a callback for you to manually check whether the input (either mouse or touch) is inside a Container/Sprite. Try contains method of PIXI shape objects if you want to test whether a point is inside. Thanks. Now I have a clearer idea of the containsPoint method. I have also tried `getBounds` method to get the shape and check if the point is contained in the shape, and I also have problem with that, which is asked here. I switched to containsPoint because the moderator of this forum suggest I use it. 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.