We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d976fcb commit 9af496cCopy full SHA for 9af496c
src/shapes/Line.js
@@ -83,7 +83,7 @@ Line.prototype.raycast = function(result, ray, position, angle){
83
vec2.toGlobalFrame(l0, l0, position, angle);
84
vec2.toGlobalFrame(l1, l1, position, angle);
85
86
- var fraction = vec2.getLineSegmentsIntersectionFraction(l0, l1, from, to);
+ var fraction = vec2.getLineSegmentsIntersectionFraction(from, to, l0, l1);
87
if(fraction >= 0){
88
var normal = raycast_normal;
89
vec2.rotate(normal, raycast_unit_y, angle); // todo: this should depend on which side the ray comes from
0 commit comments