Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9023683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:49:12+00:00 2026-06-16T05:49:12+00:00

I am writing a simple game using Box2d-Jquery. By default the position of the

  • 0

I am writing a simple game using Box2d-Jquery. By default the position of the DOM elements can be handled by clicking and dragging those corresponding elements. How can this mouse event be disabled so that the movement of the elements is not disturbed by any mouse clicks? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:49:13+00:00Added an answer on June 16, 2026 at 5:49 am

    I’m afraid you could comment the method body

      updateMouseDrag = function() {
        /*var body, md;
        if (isMouseDown && (!mouseJoint)) {
          body = getBodyAtMouse();
          if (body) {
            md = new b2MouseJointDef();
            md.bodyA = world.GetGroundBody();
            md.bodyB = body;
            md.target.Set(mouseX, mouseY);
            md.collideConnected = true;
            md.maxForce = 300.0 * body.GetMass();
            mouseJoint = world.CreateJoint(md);
            body.SetAwake(true);
          }
        }
        if (mouseJoint) {
          if (isMouseDown) {
            return mouseJoint.SetTarget(new b2Vec2(mouseX, mouseY));
          } else {
            world.DestroyJoint(mouseJoint);
            return mouseJoint = null;
          }
        }*/
      };
    

    this method will create mouse joint which is supported by box2d to handle mouse event on the bodies in the world.

    Or just comment the invoke to updateMouseDrag() in method update(). update() is the game loop method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While writing a simple game using SBCL, CL-OPENGL, and Lispbuilder-SDL, I can across a
I am currently writing a simple snake clone game for Windows 8 using MonoGame.
I am writing a simple game in java using Ovals and the Graphics objects.
I'm currently writing a very simple game using python and pygame. It has stuff
I'm writing a simple 2D game centered around mazes with RPG elements. It is
I've begun writing a game using XNA Framework and have hit some simple problem
I'm writing a simple 2D game engine using the HTML5 canvas. I've come to
I'm writing a game for Mac OS using cocos2D and Box2D. I've added a
I am writing a simple game withing which I am using a JFrame which
I want to try writing a simple game for web, using the websockets and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.