Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing green drag trail #72

Closed
Igal-Kleiner opened this issue Mar 24, 2015 · 2 comments
Closed

Removing green drag trail #72

Igal-Kleiner opened this issue Mar 24, 2015 · 2 comments

Comments

@Igal-Kleiner
Copy link

I'm trying to create a sort of mobile game with Matter.js. I'm using Matter.js mobile demo as reference point. I was able to change a few things and make it work, however I wasn't able to get rid of the green drag trail that's being shown when I drag an object. I tried this:

World.add(_world, MouseConstraint.create(_engine, {
render: {
visible: false,
lineWidth: 0,
strokeStyle: 'rgba(0,0,0,0)'
}
}));

But that didn't work. Is it possible to remove it?

@liabru
Copy link
Owner

liabru commented Mar 26, 2015

Try this:

var mouseConstraint = MouseConstraint.create(engine, {
  constraint: {
    render: {
      visible: false
    }
  }
});

@Igal-Kleiner
Copy link
Author

Yes, that worked, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants