{"action":"closed","issue":{"url":"https://api.github.com/repos/Rusketh/ExpAdv2/issues/302","labels_url":"https://api.github.com/repos/Rusketh/ExpAdv2/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/Rusketh/ExpAdv2/issues/302/comments","events_url":"https://api.github.com/repos/Rusketh/ExpAdv2/issues/302/events","html_url":"https://github.com/Rusketh/ExpAdv2/issues/302","id":127013128,"number":302,"title":"vector.intersectRayWithOBB function is not implemented correctly","user":{"login":"CaptainPRICE","id":9789070,"avatar_url":"https://avatars.githubusercontent.com/u/9789070?v=3","gravatar_id":"","url":"https://api.github.com/users/CaptainPRICE","html_url":"https://github.com/CaptainPRICE","followers_url":"https://api.github.com/users/CaptainPRICE/followers","following_url":"https://api.github.com/users/CaptainPRICE/following{/other_user}","gists_url":"https://api.github.com/users/CaptainPRICE/gists{/gist_id}","starred_url":"https://api.github.com/users/CaptainPRICE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaptainPRICE/subscriptions","organizations_url":"https://api.github.com/users/CaptainPRICE/orgs","repos_url":"https://api.github.com/users/CaptainPRICE/repos","events_url":"https://api.github.com/users/CaptainPRICE/events{/privacy}","received_events_url":"https://api.github.com/users/CaptainPRICE/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-16T09:38:46Z","updated_at":"2016-01-18T09:57:05Z","closed_at":"2016-01-18T09:57:05Z","body":"[Function documentation](https://wiki.garrysmod.com/page/util/IntersectRayWithOBB).\r\n[EA2 implementation](https://github.com/Rusketh/ExpAdv2/blob/master/lua/expadv/components/vector.lua#L305).\r\nI think that it should return a ranger instead of vector (as it returns values of different types).\r\n1st is a hit position vector. 2nd is a normal/direction vector. 3rd is a fraction of trace used (number).\r\n\r\nThe following code is a small test/demo (validates fine), but throws an exception/error on runtime.\r\n```\r\nserver\r\n{\r\n    event think()\r\n    {\r\n        foreach (number k; player p : players()) // Go multiplayer (with some players/bots).\r\n        {\r\n            //                             ray start,    ray direction (fake), box origin,    box angles, box min,          box max\r\n            vector v = intersectRayWithOBB(p.shootPos(), p.eye(),              owner().pos(), ang(),      owner().boxMin(), owner().boxMax())\r\n            print(v)\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nConsole output:\r\n```\r\nExpression Advanced 2 - Suffered a serverside Script error:\r\nlua/expadv/components/vector.lua:16: attempt to index local 'Vector' (a nil value)\r\n```\r\n\r\nImages:\r\n![EA2 IDE](https://i.imgur.com/meVF4xh.png)\r\n![Exception thrown](https://i.imgur.com/yFDZyxL.png)"}}