{"action":"created","issue":{"url":"https://api.github.com/repos/liabru/matter-js/issues/155","labels_url":"https://api.github.com/repos/liabru/matter-js/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/liabru/matter-js/issues/155/comments","events_url":"https://api.github.com/repos/liabru/matter-js/issues/155/events","html_url":"https://github.com/liabru/matter-js/issues/155","id":108452974,"number":155,"title":"Calculate force of collision","user":{"login":"marekventur","id":158185,"avatar_url":"https://avatars.githubusercontent.com/u/158185?v=3","gravatar_id":"","url":"https://api.github.com/users/marekventur","html_url":"https://github.com/marekventur","followers_url":"https://api.github.com/users/marekventur/followers","following_url":"https://api.github.com/users/marekventur/following{/other_user}","gists_url":"https://api.github.com/users/marekventur/gists{/gist_id}","starred_url":"https://api.github.com/users/marekventur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marekventur/subscriptions","organizations_url":"https://api.github.com/users/marekventur/orgs","repos_url":"https://api.github.com/users/marekventur/repos","events_url":"https://api.github.com/users/marekventur/events{/privacy}","received_events_url":"https://api.github.com/users/marekventur/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-26T09:52:31Z","updated_at":"2015-12-12T14:42:58Z","closed_at":"2015-09-27T13:49:48Z","body":"Hi!\r\n\r\nIs there any way to detect the force(?) of a collision? When I listen to ```collisionActive``` I get a list of current collision with some information like overlap and contact points, but I can't quite figure out whether I can use any of that to calculate how hard the impact was.\r\n\r\nMy use case is to detect whether an object should be destroyed after a collision has been detected. E.g. I want object to be stackable but if you throw a heavy stone at it they should disappear.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/liabru/matter-js/issues/comments/164158961","html_url":"https://github.com/liabru/matter-js/issues/155#issuecomment-164158961","issue_url":"https://api.github.com/repos/liabru/matter-js/issues/155","id":164158961,"user":{"login":"LiorArbel","id":7826319,"avatar_url":"https://avatars.githubusercontent.com/u/7826319?v=3","gravatar_id":"","url":"https://api.github.com/users/LiorArbel","html_url":"https://github.com/LiorArbel","followers_url":"https://api.github.com/users/LiorArbel/followers","following_url":"https://api.github.com/users/LiorArbel/following{/other_user}","gists_url":"https://api.github.com/users/LiorArbel/gists{/gist_id}","starred_url":"https://api.github.com/users/LiorArbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiorArbel/subscriptions","organizations_url":"https://api.github.com/users/LiorArbel/orgs","repos_url":"https://api.github.com/users/LiorArbel/repos","events_url":"https://api.github.com/users/LiorArbel/events{/privacy}","received_events_url":"https://api.github.com/users/LiorArbel/received_events","type":"User","site_admin":false},"created_at":"2015-12-12T14:42:58Z","updated_at":"2015-12-12T14:42:58Z","body":"Hey,\r\n\r\nYour solution is a bit problematic for me, as collision.depth doesn't care about the bodies' masses, and saving the last velocity of every single body in the game sounds a bit crazy, and will break the design of my code :S\r\n\r\nI tried a simple workaround - multiplying the collision.depth by the absolute mass difference of the two objects (I have not a bit of experience in physics, sorry in advance).\r\n\r\nNow I get better collision force feeling, however with a very big flaw - the current workaround doesn't consider the penetration direction, and throwing a very light object into a very heavy object outputs the same force as throwing the heavy object into the light one.\r\n\r\nSo - isn't there a way to calculate the force using the penetration vector direction?"}}