'Hiding green constraint drag trail in Matter.js
I'm trying to create a small mobile game using Matter.js. I'm testing a few things with their mobile demo, found here: https://github.com/liabru/matter-js/blob/master/demo/js/DemoMobile.js
I can't figure out how to hide this green dragging trail that is shown when I drag an object. I tried to do the following:
World.add(_world, MouseConstraint.create(_engine, {
render: {
visible: false,
lineWidth: 0,
strokeStyle: 'rgba(0,0,0,0)'
}
}));
But that didn't work. Any ideas?
Solution 1:[1]
Try this:
var mouseConstraint = MouseConstraint.create(engine, {
constraint: {
render: {
visible: false
}
}
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | liabru |
