oframe / ogl

Minimal WebGL Library
https://oframe.github.io/ogl/examples
3.71k stars 211 forks source link

Add plane intersection to Raycast object #171

Closed pvdosev closed 1 year ago

pvdosev commented 1 year ago

This adds a method for the Raycast class to be able to intersect with planes. I tried to follow the style of the other intersection methods, let me know if anything doesn't look right! The math is the same as described here: https://math.stackexchange.com/questions/4402134/determining-plane-intersection-with-a-ray

gordonnl commented 1 year ago

Thanks a lot!