Search code examples
javascriptopengl-escollision-detectionwebgl

How to detect collision in webgl?


How to detect collision in webgl, without using any library like three.js?


Solution

  • 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).