Wrong order of terms in intersect.sphere_triangle
aki-cat opened this issue · 2 comments
aki-cat commented
Hi. I'm not sure if it's ok for me to post an issue, but anyway:
--[[ in modules/intersect.lua | starting at line 579 ]]--
local Q1 = A * e1 - d1 * AB
local Q2 = B * e2 - d2 * BC
local Q3 = C * e3 - d3 * CA
vec3
crashes when executing these lines (the d1 * AB
-like parts), because it assumes the vector goes on the left side of the operation
easy fix:
local Q1 = A * e1 - AB * d1
local Q2 = B * e2 - BC * d2
local Q3 = C * e3 - CA * d3
shakesoda commented
thanks, I'll get this sorted out (wondering why I didn't see this earlier - no test!)
shakesoda commented
a year overdue - but this is fixed in master now, thanks a lot!