{"author_name":"khakionion","cat":"LD #27","comments":[{"author_name":"joecarrot","time":"August 24, 2013 9:20 pm","epoch":1377397200,"text":"You can also use a characterController.","spam":"N"},{"author_name":"khakionion","time":"August 24, 2013 9:27 pm","epoch":1377397620,"text":"The character controller didn&#8217;t do what I want, but yes, it&#8217;s also an option.","spam":"N"}],"epoch":1377397080,"likes":0,"metadata":{"p_key":"39635","p_author":"khakionion","p_authorkey":"4720","p_urlkey":"75254","p_title":"\u201cKinematic-Rigidbody Trigger Collider\u201d","p_cat":"LD #27","p_event":"LD27","p_time":"1377397080","p_likes":"0","p_comments":"2","p_status":"UPD5","us_key":"4720","us_name":"khakionion","us_username":"khakionion","event_start":"1377216000","event_key":"18","event_name":"LD27"},"text":"<p>Well, I lost a few hours to making my collision work. It all happened because I wanted to drive my GameObjects exclusively on my own, and not depend on the PhysX engine. <\/p>\n <p>The relevant <a href=\"http:\/\/docs.unity3d.com\/Documentation\/ScriptReference\/Collider.OnTriggerEnter.html\">Unity physics documentation page<\/a> that explains how to make this work is a little more obscure than you&#8217;d expect at first, but if you&#8217;re making a Unity game where 1) You&#8217;re not using the PhysX engine and 2) You want to detect collisions, then here&#8217;s what you need to do:<\/p>\n <ul>\n <li>Give rigidbodies to all your colliders.<\/li>\n <li>On those rigidbodies, set isKinematic to true.<\/li>\n <li>On the collider, set isTrigger to True.<\/li>\n <li>Detect collisions in the trigger functions, OnTriggerXXX(), not OnCollisionXXX().<\/li>\n <\/ul>\n <p>That&#8217;s it! I&#8217;m happy I figured this out during a Ludum Dare, and not on a more important project, but either way I&#8217;m glad I know what to do next time.<\/p>","time":"August 24th, 2013 9:18 pm","title":"\u201cKinematic-Rigidbody Trigger Collider\u201d"}