orpgol Posted April 15, 2014 Share Posted April 15, 2014 Hello and greetings from israel...first of all, pixi is awesome, and i really want to incorporate in a project i'm working on... My problem is this: i am trying to get my sprites location during it's movement, so i can set interactions with html elements on the page (example: when the bunny reaches the <section> with id = "A", "A" disappears OR bunny stops moving). I tried reading the API and found getBounds() and some other related, but could not get them to work properly (if they at all suppose to do what i thought) thanks in advance and sorry if this is a stupid question or if my english is not that good... Quote Link to comment Share on other sites More sharing options...
Sebi Posted April 16, 2014 Share Posted April 16, 2014 That's just simple collision detection. Just iterate over an array of elements after moving the bunny and do a rectangle hittest.The html elements are not part of the stage so they don't have anything to do with the pixi api. Or just post an example of your code to get more help 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.