How to detect collision in webgl?
问题 How to detect collision in webgl, without using any library like three.js? 回答1: How to detect collision in webgl You don't. WebGL, like OpenGL is only for drawing stuff. It doesn't manage a scene, it has no notion of "objects" or such high level things like collisions. It's all about points, lines, triangles and shaders. Anything related to scene management or collisions lies outside the scope of WebGL (and OpenGL). 回答2: A simple approach it to do ray collision detection on the GPU. Checkout