Matter.js Mouse Drag | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Matter.js Mouse Drag

ODLNT , maybe you can help? The Matter.js documentation has limited explanation on how to do stuff. Does anyone know how to "drag" a Matter.js shape across the screen. (Not with p5). All I got is that you use Matter.MouseConstraint.create(), and that's it. <script src="https://cdnjs.cloudflare.com/ajax/libs/matter-js/0.12.0/matter.min.js"></script> brm.io/matter-js/docs/

31st May 2019, 4:22 PM
Clueless Coder
Clueless Coder - avatar
1 Answer
+ 4
Edit: Found better example of mouse control at the liabru matter.js git hub repository https://raw.githubusercontent.com/liabru/matter-js/master/examples/catapult.js https://code.sololearn.com/WVHkiT7oJKB2/#js
31st May 2019, 9:24 PM
ODLNT
ODLNT - avatar