fela98

Members
  • Content Count

    4
  • Joined

  • Last visited

Everything posted by fela98

  1. I finally figured it out. Posting this for future readers. I found out that the Interaction graph had to be rebuilt when something was reordered in the stage array. I looked at the source of the InteractionManager and found this: http://www.goodboydigital.com/pixijs/docs/files/src_pixi_InteractionManager.js.html#l359 when i called this after reordering the elements, everything worked fine. Also in the first fiddle i accedentally included an old version of pixi. Here is a new fiddle with a new version and with: stage.interactionManager.rebuildInteractiveGraph()http://jsfiddle.net/fela98/oer4828L/9/
  2. Hello to all pixi fans I have a problem, when i reorder a DisplayObjectContainer's children array, the mouse events are not reordered (so it seems atleast). Here is the fiddle: http://jsfiddle.net/fela98/oer4828L/3/ The MouseEvents are not dispatched to the correct Sprites. Sometimes am I dragging a sprite that is behind the on I clicked. Am I supposed to reorder the children array manually or should i only do it with the swapChildren method? Am I doing something wrong or is this a bug? Thanks in advance!
  3. Thanks! It worked really well, I didn't know that this property existed. Guess this was just me being stupid. However thanks for the help!
  4. Hi, I'm relatively new to Pixi. I have a problem similar to the one mentioned in this post: http://www.html5gamedevs.com/topic/5766-bunny-drag-example-with-correct-mouse-offset/?hl=%2Bdrag+%2Bpixi I used the code from the post and it worked seamlessly. However, when i began rotating the Sprites the offset became wrong, and the sprite jumps to another location when i begin dragging it. Do i have to use some trigonometric function to reverse the rotation? How can I do this? Here is a version with rotation: http://jsfiddle.net/cXfpq/2/ Here without rotation: http://jsfiddle.net/dirkk0/cXfpq/ Thanks in advance! Felix