Matter.js Constraints
I've been trying to work out constraints in matter.js. For whatever reason I can't get them to work on my own and I can't find any examples on the internet that don't come with a heap of other code attached.
Right now I have a body that follows to the mouse so that wherever the cursor goes, it will collide with other bodies. My idea is to have the images on my website bounce out of the way a bit when I move the mouse past them. And I think this should be possible by adding a simple constraint between a body with the image on it and a static body to anchor it to the page.
all that shouldn't be too difficult if I can just get constraints to happen though
https://brm.io/matter-js/demo/#constraints
Right now I have a body that follows to the mouse so that wherever the cursor goes, it will collide with other bodies. My idea is to have the images on my website bounce out of the way a bit when I move the mouse past them. And I think this should be possible by adding a simple constraint between a body with the image on it and a static body to anchor it to the page.
all that shouldn't be too difficult if I can just get constraints to happen though
https://brm.io/matter-js/demo/#constraints