darkf Posted May 10, 2016 Share Posted May 10, 2016 Runnable code here: https://github.com/darkf/grr I'm using P2 physics and I'm trying to raycast to the mouse position. I've got a tilemap with physics bodies set up, and they show fine with debug draw on. However, the ray never hits any of the tile bodies, nor the player body. It only hits the top and left side of the world bounds. Screenshots attached. Is there anything obvious I'm doing wrong, or is this a bug? Link to comment Share on other sites More sharing options...
darkf Posted May 10, 2016 Author Share Posted May 10, 2016 The official Box2D raycasting example: http://phaser.io/examples/v2/box2d/raycasting Is similarly broken, the ray doesn't intersect anything for me. This might be a Phaser bug/regression. Link to comment Share on other sites More sharing options...
rich Posted May 10, 2016 Share Posted May 10, 2016 I'm confused, which are you using, p2 or Box2D? Because the second message implies Box2D, but the first P2. They're not interchangeable. Link to comment Share on other sites More sharing options...
darkf Posted May 10, 2016 Author Share Posted May 10, 2016 1 hour ago, rich said: I'm confused, which are you using, p2 or Box2D? Because the second message implies Box2D, but the first P2. They're not interchangeable. I'm using P2 myself. My second post was remarking that the Box2D example is also similarly broken -- so it might be a Phaser issue rather than a P2/Box2D one. Link to comment Share on other sites More sharing options...
darkf Posted May 11, 2016 Author Share Posted May 11, 2016 Any ideas @rich? Can you reproduce this on your machine (see the Box2D Raycasting example on the Phaser site), or is this a known issue? Link to comment Share on other sites More sharing options...
darkf Posted May 15, 2016 Author Share Posted May 15, 2016 The http://phaser.io/examples/v2/box2d/raycasting example is still broken. :/ Link to comment Share on other sites More sharing options...
unsingefou Posted January 4, 2017 Share Posted January 4, 2017 Any updates or workarounds for this one? I am also not able to get any rays to hit anything beside the world bounds. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts