title: How to create colision detection with 3d objects?
body: <p>I'm creating a re-make of <strong>atari 8bit</strong> game called <a href="https://youtu.be/G5WbTEbO-Qw" rel="nofollow noreferrer">spindizzy</a> as my school project.</p>
  
  <p>I figured out how to render it using casting <code>3d points</code> to <code>2d perspective point</code>.</p>
  
  <p>I also can spin shapes <em>(with minor problem of order of rendering)</em>.</p>
  
  <p>My goal was something like this:</p>
  
  <p><code>Vector3D -&gt; Vector2D</code> - done</p>
  
  <p><code>Block -&gt; [[Vector3D]] -&gt; [[Vector2D]] -&gt; [Shape]</code> - done</p>
  
  <p><code>Map -&gt; [Location] -&gt; [[[Block]]]</code></p>
  
  <p>But I have no idea what should chandle colision detection, and how to chandle it.  </p>
  
  <p>My target language is <code>js</code> but it does not matter if given answer is in other language or just description of how to solve this problem.<br>
  Frameworks are not allowed.</p>
  
  <p>I'm using <code>2d</code> context of canvas.</p>
  
  <p><a href="https://github.com/koziejka/spindizzy" rel="nofollow noreferrer">Here</a> you can see my code.</p>
  
  <p>I'll be aslo grateful for the links and suggestions.</p>