schteppe / p2.js

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

Line.raycast computes wrong fraction #342

Open palra opened 5 years ago

palra commented 5 years ago

Fraction was computed in the wrong order. It resulted in a wrong RaycastResult fraction, calculated upon the collided line, not the ray.