Search Unity

GJK box problem

Discussion in 'Physics' started by athert, Sep 11, 2016.

  1. athert

    athert

    Joined:
    Dec 31, 2012
    Posts:
    2
    I have implementation of GJK in my unity project (im trying create my own physic so thats why i put this question to physics.. im sorry if i put it to wrong section) by website i found on google (http://programyourfaceoff.blogspot.cz/2012/01/gjk-algorithm.html and http://in2gpu.com/2014/05/18/gjk-algorithm-3d/) and it work pretty well with sphere but everytime i try to create some box vs. box collision, i got invalid collision results. I try both algorithm and both say invalid results on exactly same positions so i think that algorithm is OK but somewhere else must be some mistake (maybe lefthand vs. righthand coord? i dont know..). If you look on first web i post, i have exactly same code (with a minor repairs like matrix etc) but box have some issues. Here : http://pastebin.com/n6FS3kKr is my code that i have in Unity, can you please help me resolve this problem? I try every solution i found on internet and i cant just resolve it by myself. Thank you.