{"action":"created","issue":{"url":"https://api.github.com/repos/schteppe/cannon.js/issues/303","repository_url":"https://api.github.com/repos/schteppe/cannon.js","labels_url":"https://api.github.com/repos/schteppe/cannon.js/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/schteppe/cannon.js/issues/303/comments","events_url":"https://api.github.com/repos/schteppe/cannon.js/issues/303/events","html_url":"https://github.com/schteppe/cannon.js/issues/303","id":175968599,"number":303,"title":"On getting the local contact point","user":{"login":"matti777","id":5628148,"avatar_url":"https://avatars.githubusercontent.com/u/5628148?v=3","gravatar_id":"","url":"https://api.github.com/users/matti777","html_url":"https://github.com/matti777","followers_url":"https://api.github.com/users/matti777/followers","following_url":"https://api.github.com/users/matti777/following{/other_user}","gists_url":"https://api.github.com/users/matti777/gists{/gist_id}","starred_url":"https://api.github.com/users/matti777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matti777/subscriptions","organizations_url":"https://api.github.com/users/matti777/orgs","repos_url":"https://api.github.com/users/matti777/repos","events_url":"https://api.github.com/users/matti777/events{/privacy}","received_events_url":"https://api.github.com/users/matti777/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-09T09:38:48Z","updated_at":"2016-09-09T10:42:29Z","closed_at":null,"body":"I'm interested in getting the local point of collision on my shapes. I cannot find any documentation for the event parameter for 'collide' events, but after a few hours of source-diving and debugprinting I've come to the conclusion I should be looking at `event.contact.ri` / `event.contact.rj`. From the documentation for `ContactEquation` (http://schteppe.github.io/cannon.js/docs/classes/ContactEquation.html) I found similarly named parameters ri / rj, and their documentation states that \"World-oriented vector that starts in body j position and goes to the contact point.\" which would be exactly what I need for my purposes. However when I inspect the values of ri / rj upon contact I get really absurd values: \r\n\r\n```\r\nx: 1.19453453\r\ny: -1.94233442423e-15\r\nz: 7.7324\r\n\r\n```\r\n\r\n..considering the shape for that body is a Box(0.6, 0.4, 0.0001) ie. the x / z values should not be possible? Do I need to do somekind of a transform to actually get the local collision point on my Box?\r\n\r\nthanks for cannon.js btw, I find it rather easy to use, however the documentation could sometimes be a little more in-depth for us who are not 100% familiar with physics engine concepts :P\r\n\r\n- Matti"},"comment":{"url":"https://api.github.com/repos/schteppe/cannon.js/issues/comments/245880156","html_url":"https://github.com/schteppe/cannon.js/issues/303#issuecomment-245880156","issue_url":"https://api.github.com/repos/schteppe/cannon.js/issues/303","id":245880156,"user":{"login":"matti777","id":5628148,"avatar_url":"https://avatars.githubusercontent.com/u/5628148?v=3","gravatar_id":"","url":"https://api.github.com/users/matti777","html_url":"https://github.com/matti777","followers_url":"https://api.github.com/users/matti777/followers","following_url":"https://api.github.com/users/matti777/following{/other_user}","gists_url":"https://api.github.com/users/matti777/gists{/gist_id}","starred_url":"https://api.github.com/users/matti777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matti777/subscriptions","organizations_url":"https://api.github.com/users/matti777/orgs","repos_url":"https://api.github.com/users/matti777/repos","events_url":"https://api.github.com/users/matti777/events{/privacy}","received_events_url":"https://api.github.com/users/matti777/received_events","type":"User","site_admin":false},"created_at":"2016-09-09T10:42:29Z","updated_at":"2016-09-09T10:42:29Z","body":"My box body was being .bj. So should rj be the local point (for bj) without any further transforms? Since my body has z-thickness of 0.001 I find the z value of 7.7 quite off. Also no matter where I did the collision on the box, I would get a similarly tiny (<something>e-15) y-value. And x value was being too large for my Box'es halfExtents (0.6 for x). "}}
{"actor":{"display_login":"matti777"}}