{"id":81,"date":"2018-02-23T18:00:39","date_gmt":"2018-02-24T00:00:39","guid":{"rendered":"http:\/\/www.chroniclesoftright.com\/blog\/?p=81"},"modified":"2018-02-23T16:04:18","modified_gmt":"2018-02-23T22:04:18","slug":"collision-detection-update","status":"publish","type":"post","link":"https:\/\/www.chroniclesoftright.com\/blog\/2018\/02\/23\/collision-detection-update\/","title":{"rendered":"Collision detection update"},"content":{"rendered":"<p>Well, the short version is that I have a very basic collision detection and response system working.\u00a0 My test scene has a sphere that I can move left or right.\u00a0 If the sphere hits a triangle it slides along the surface of the triangle.\u00a0 I even put two triangles with different slopes next to one another and the sphere slides along one then changes pace slightly as it slides along the other.\u00a0 I simplified the code from the Faurby paper I was using and there&#8217;s probably some stuff I&#8217;ll find out later I&#8217;m missing, but the basic concept is working.<\/p>\n<p>My next step is to generalize to code to handle meshes instead of individually defined triangles.\u00a0 This is &#8220;narrow phase&#8221; collision detection and is relatively expensive to calculate, so I&#8217;ll need a broad phase scheme as well.\u00a0 Fortunately, <a href=\"http:\/\/threejs.org\" target=\"_blank\" rel=\"noopener\">THREE.js<\/a> includes a utility to generate an axis aligned bounding box around a mesh and these are pretty easy to use to eliminate most geometry from consideration during the broad phase.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well, the short version is that I have a very basic collision detection and response system working.\u00a0 My test scene has a sphere that I can move left or right.\u00a0 If the sphere hits a triangle it slides along the surface of the triangle.\u00a0 I even put two triangles with different slopes next to one&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-planning-and-development"],"_links":{"self":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":1,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":82,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions\/82"}],"wp:attachment":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}