Jump to content


  • Content Count

  • Joined

  • Last visited

About shaunumb

  • Rank

Recent Profile Visitors

747 profile views
  1. Ah thanks for the explanation; however, using the docs I can't see a way to override the default Narrowphase behaviour with my own 'overlap' method. Cheers
  2. Okay – I can see the postbroadphase func could be useful in creating something similar to overlap in P2; however, it p2 doesn't seem to recognise correctly polygons using this method. I've set up an example here: http://picturesandwriting.com/examples/p2-polygon-overlap/ If you inspect with the console you can see that the overlapping call is constantly firing even if it's not touching the polygon area. It's firing if it's within the sprite's enclosing rectangle – as soon as it's out of it's rectangle it stops firing.
  3. Yes, I have exactly the same question. Can't figure out how to recreate Arcade overlap with P2.
  4. Right, there is a way of getting the correct the coords from SpriteHelper App... however it seems that Phaser doesn't calculate the overlap correctly on concave polygons I've attached a screenshot of the two elements not overlapping with debug on, but Phaser still sees it as an overlap.
  5. Erm... actually it's a really long wiggly line so I guess it's both concave and convex. I can see it's plotted the points correctly in PhysicsEditor, but I don't really know what to do with the exported format. I need a simple 1D JSON array of x,y coords e.g. [0,50, 300,20... etc] , but what I get out of PhysicsEditor using the Lime + Corona setting (for example) is something like: {"density": 0, "friction": 0, "bounce": 0, "filter": { "categoryBits": 0, "maskBits": 0 },"shape": [ 129, 5000 , 129, 4980 , 136, 4982 , 134, 5000 ]} ,{"density": 0, "friction": 0, "bounce": 0, "filt
  6. Okay cheers guys. I understand about the Pause the game screwing with the inputs. So it look like the best thing to do is just stop moving my elements individually.
  7. Hey I'm trying to find a tool that will let me export the correct style JSON to add to a sprite using the .setPolygon() method. I've tried all the export settings from PhysicsEditor and none seem to provide the correct JSON. Is this the best tool to be used to create points from a shape with a transparent background? The polygon itself is quite complex, consisting of around 400 points. I wonder if it's even possible with this many points?
  8. Hi guys – just discovered Phaser yesterday. Just wondering if anyone has an example of a pause screen/state in a game created? Would be great to see some code. Had a look at the examples in the docs and couldn't see anything. Also, is the only way to pause/resume a game to individually pause and then resume all the moving / relevant elements, or am I missing some amazing game.pause() function? I pretty familiar with JS, but am pretty much a noob at creating games with frameworks. Many thanks, Shaun
  • Create New...