Jump to content


  • Content Count

  • Joined

  • Last visited

About psyrendust

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. In case anyone is trying this in PIXI v4 things are a bit different. dirty and clearDirty are now numbers not booleans, so you have to increment them. Here is a little function you can use to change any of the props for a given graphic. function updateGraphicProps(graphic, props) { const graphicsData = graphic.graphicsData; const keys = Object.keys(props); const jlen = keys.length; let i; let j; let ilen; let key; let shape; // Update the props on the graphic. for (j = 0; j < jlen; j++) { key = keys[j]; graphic[key] = props[key]; } // Update the props for
  2. Thanks @OSUblake for the SAT link. I'll have to check it out. I was able to get collision detection going by calculating all of the vertices for a bounding box that has been oriented to the global coordinate space, then doing line intersection on each of the four line segments that make up each vertex bounding box. I'm able to show the coordinate of the first intersection found for two elements (bails out quickly for perf) (highlighted by a green dot). I'll have to take a look at the SAT example to see if there is any optimization that I can do, or if I'm better off working with SAT.js. h
  3. Thanks for the tip @ivan.popelyshev. I'm now able to get the correct bounding box I want by grabbing the 4 vertices of the local bounds and applying the world transform to each vertex. You can see my latest update here: My next step is to improve the collision detection method based on the new vertex bounding box. I'll post the final result when I get to it.
  4. Hi, I'm running into an issue regarding collision detection against adjacent DisplayObjects. Let's say I have sibling objects that are a child of a Container that has been rotated. If I use getBounds() on the siblings they return a bounding box that is oriented to cardinal north. Using those bounds for collision detection may result in false positives, because the given bounds may not follow the actual shape and orientation of the DisplayObject. I created a codepen to illustrate the point: When you toggle the "rotate" buttons at the bottom of the pen you will see the purple box morp
  5. @ivan.popelyshev Has there been an update on an approximation of when the official 3d implementation will roll into pixi v4?
  • Create New...