vihanagarwal Posted February 13, 2017 Share Posted February 13, 2017 I have a dictionary of sprites displayed on the screen. I am trying to remove the sprite that the user clicks on. To do this I am trying to get the location of the mouse click, and get the sprite at that location. Is there a function to get a sprite on a stage based on location? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 13, 2017 Share Posted February 13, 2017 You have to look in examples: http://pixijs.github.io/examples/#/demos/interactivity.js Also, if you look inside "displayObject._trackedPointers", it will have info about mouse if there's something above the element, you can just iterate over everything and analyze the data 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.