{"action":"created","issue":{"url":"https://api.github.com/repos/liabru/matter-js/issues/307","repository_url":"https://api.github.com/repos/liabru/matter-js","labels_url":"https://api.github.com/repos/liabru/matter-js/issues/307/labels{/name}","comments_url":"https://api.github.com/repos/liabru/matter-js/issues/307/comments","events_url":"https://api.github.com/repos/liabru/matter-js/issues/307/events","html_url":"https://github.com/liabru/matter-js/issues/307","id":184509666,"number":307,"title":"How to cancel a collision","user":{"login":"edmlin","id":1139804,"avatar_url":"https://avatars.githubusercontent.com/u/1139804?v=3","gravatar_id":"","url":"https://api.github.com/users/edmlin","html_url":"https://github.com/edmlin","followers_url":"https://api.github.com/users/edmlin/followers","following_url":"https://api.github.com/users/edmlin/following{/other_user}","gists_url":"https://api.github.com/users/edmlin/gists{/gist_id}","starred_url":"https://api.github.com/users/edmlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edmlin/subscriptions","organizations_url":"https://api.github.com/users/edmlin/orgs","repos_url":"https://api.github.com/users/edmlin/repos","events_url":"https://api.github.com/users/edmlin/events{/privacy}","received_events_url":"https://api.github.com/users/edmlin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/liabru/matter-js/labels/feature-request","name":"feature-request","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-21T15:09:59Z","updated_at":"2016-10-21T15:35:14Z","closed_at":null,"body":"Hi,\r\nFirst of all, thanks for the great work!\r\nThis is a question rather than an issue. In my test, I want to move a body with the mouse by changing the body's position in the mousemove event. When I move the body and it touches another body, I want it to stop instead of pushing the other body and bouncing back. It's like in a pool game, when I'm moving the white ball, I don't want it to bounce other balls. After I stop moving it, I can apply a force to it and it can bounce other balls. Is it possible to cancel the collision in the collisionStart event or I should do it in a different way?\r\nThanks."},"comment":{"url":"https://api.github.com/repos/liabru/matter-js/issues/comments/255410128","html_url":"https://github.com/liabru/matter-js/issues/307#issuecomment-255410128","issue_url":"https://api.github.com/repos/liabru/matter-js/issues/307","id":255410128,"user":{"login":"liabru","id":654420,"avatar_url":"https://avatars.githubusercontent.com/u/654420?v=3","gravatar_id":"","url":"https://api.github.com/users/liabru","html_url":"https://github.com/liabru","followers_url":"https://api.github.com/users/liabru/followers","following_url":"https://api.github.com/users/liabru/following{/other_user}","gists_url":"https://api.github.com/users/liabru/gists{/gist_id}","starred_url":"https://api.github.com/users/liabru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liabru/subscriptions","organizations_url":"https://api.github.com/users/liabru/orgs","repos_url":"https://api.github.com/users/liabru/repos","events_url":"https://api.github.com/users/liabru/events{/privacy}","received_events_url":"https://api.github.com/users/liabru/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T15:35:14Z","updated_at":"2016-10-21T15:35:14Z","body":"Try listen for `collisionStart` event on the engine, then find the `pair` for the collision with the bodies you're interested in (from the event payload), then set `pair.isActive = false`. Hopefully that should stop that collision being resolved.\r\n\r\nAlso take a look at body [sensors](http://brm.io/matter-js/docs/classes/Body.html#property_isSensor) and [collision filters](http://brm.io/matter-js/docs/classes/Body.html#property_collisionFilter) ([demo](http://brm.io/matter-js/demo/#collisionFiltering)) they may be helpful to you too."}}
{"actor":{"display_login":"liabru"}}