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

Turn off mouse interaction in testbed #289

Closed
rgov opened this issue Sep 29, 2024 · 2 comments
Closed

Turn off mouse interaction in testbed #289

rgov opened this issue Sep 29, 2024 · 2 comments

Comments

@rgov
Copy link

rgov commented Sep 29, 2024

I'm not sure if it's possible to disable the mouse in the testbed. For example setting testbed.mouseForce = 0 triggers some other behavior rather than disabling it:

if (this.mouseForce) {
targetBody = body;
} else {
mouseJoint = new MouseJoint({maxForce: 1000}, mouseGround, body, { x: point.x, y: point.y });
world.createJoint(mouseJoint);
}

The closest I can get is testbed.mouseForce = 0.001 which is not truly disabled and difficult to discover.

@shakiba
Copy link
Collaborator

shakiba commented Oct 10, 2024

I will try to implement this in next testbed release.

@shakiba
Copy link
Collaborator

shakiba commented Dec 27, 2024

I fix for this, in v1.3.0

With the fix, you need to set mouseForce to 0 to disable it.

@shakiba shakiba closed this as completed Dec 31, 2024
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