• Content Count

  • Joined

  • Last visited

  1. Petar

    detect collision with sprites in Container

    I hope that we did not start off on the wrong foot, I really appreciate PIXI and the people who have made it possible. Here is what I am trying to do now: I'm trying to test for any child rectangle that is hitting the PIXI.point that I have created, but my console.log is simply returning a constant stream of nulls.
  2. Petar

    detect collision with sprites in Container

    Man.. I wasn't trying to tell anyone how to code PIXI.. it's just that I'm very poor at understanding how to use it very well, so I just thought that the easiest way to ask for help would be to show everyone what it is that I am trying to do, and how I am trying to do it... I'm just not very good at understanding the docs, no matter how much I try to read them... please don't take it the wrong way, and thanks for your suggestions.
  3. I am creating the following container with multiple sprites: And I am trying to figure out how to detect when any sprite has collided with a specific point on the stage: I've done a lot of Googling and a lot of experimentation, and I have not been able to figure it out. Any help is all is very much appreciated.
  4. Petar

    Create multiple rectangles of multiple sizes

    The following is what I have done to create a group of sprites that I can animate as one: I am still working on being able to do collision detection on a given child sprite.
  5. I am currently creating a rectangle like so: What I would like to be able to iterate through an array of objects that each contain width, positionX and positionY values, in order to be able to create / stage one group that contains all rectangles: I also need to be able to move the entire group of rectangles at a steady rate (something I'm already doing with the single rectangle) and I need to be able to do collision detection with each individual rectangle. Any ideas?
  6. Petar

    Pixi and React

    I was able to solve the issue by doing: Using an arrow function gave me access to "this", which gave me access to "this.props", which allowed me to react to changing parent component state from within the animation loop of child component. I just had to make sure to only call update() after it was defined, also.
  7. Petar

    Pixi and React

    I'm playing around with PIXI and React... I have a basic animation running from within a React component... the function that handles this gets called on componentDidMount()... the parent component passes down a prop called valueIsMatched... does anyone see any way that I can get the animation loop to console.log "value is matched" when the parent state changes to true? Also, I am aware of React-Pixi, but I was not able to get in running with latest React.