schteppe / p2.js

JavaScript 2D physics library
Other
2.64k stars 330 forks source link

Ray Casting For Polygons #176

Closed noelb closed 9 years ago

noelb commented 9 years ago

Hi,

I'm trying to get raycasting working for polygons and wasn't having any luck.

I noticed that the capsule in the live example doesn't appear to work: https://schteppe.github.io/p2.js/examples/canvas/raycasting.html

And the pentagram in the example included in the current build doesn't work either. https://github.com/schteppe/p2.js/blob/master/examples/canvas/raycasting.html

Still in progress or am I doing something wrong?

Thanks.

screen shot 2015-07-06 at 4 49 29 pm

schteppe commented 9 years ago

Hi,

It's in progress. The most recent version should work though. Try rebuilding p2.js locally (npm install && grunt) and run the same example.

Beware: the raycasting API is about to change soon.

noelb commented 9 years ago

Thanks Stefan. Looking forward to the raycasting updates, p2js is pretty fantastic.

schteppe commented 9 years ago

Thanks! Check out the new release. The live raycasting demo should work now!