void HandleMouseButtonDown(MouseButtonDownEventArgs args)
        {
            Input          input        = Input;
            PhysicsWorld2D physicsWorld = scene.GetComponent <PhysicsWorld2D>();
            RigidBody2D    rigidBody    = physicsWorld.GetRigidBody(input.MousePosition.X, input.MousePosition.Y, uint.MaxValue); // Raycast for RigidBody2Ds to pick

            if (rigidBody != null)
            {
                pickedNode = rigidBody.Node;
                //log.Info(pickedNode.name);
                StaticSprite2D staticSprite = pickedNode.GetComponent <StaticSprite2D>();
                staticSprite.Color = (new Color(1.0f, 0.0f, 0.0f, 1.0f)); // Temporary modify color of the picked sprite

                // Create a ConstraintMouse2D - Temporary apply this constraint to the pickedNode to allow grasping and moving with the mouse
                ConstraintMouse2D constraintMouse = pickedNode.CreateComponent <ConstraintMouse2D>();
                constraintMouse.Target           = GetMousePositionXY();
                constraintMouse.MaxForce         = 1000 * rigidBody.Mass;
                constraintMouse.CollideConnected = true;
                constraintMouse.OtherBody        = dummyBody; // Use dummy body instead of rigidBody. It's better to create a dummy body automatically in ConstraintMouse2D
                constraintMouse.DampingRatio     = 0.0f;
            }

            mouseMoveEventToken = Input.SubscribeToMouseMoved(HandleMouseMove);
            mouseButtonUpToken  = Input.SubscribeToMouseButtonUp(HandleMouseButtonUp);
        }
        void HandleTouchBegin3(TouchBeginEventArgs args)
        {
            var            graphics     = Graphics;
            PhysicsWorld2D physicsWorld = scene.GetComponent <PhysicsWorld2D>();
            RigidBody2D    rigidBody    = physicsWorld.GetRigidBody(new Vector2(args.X, args.Y), uint.MaxValue); // Raycast for RigidBody2Ds to pick

            if (rigidBody != null)
            {
                pickedNode = rigidBody.Node;
                StaticSprite2D staticSprite = pickedNode.GetComponent <StaticSprite2D>();
                staticSprite.Color = (new Color(1.0f, 0.0f, 0.0f, 1.0f)); // Temporary modify color of the picked sprite
                rigidBody          = pickedNode.GetComponent <RigidBody2D>();

                // Create a ConstraintMouse2D - Temporary apply this constraint to the pickedNode to allow grasping and moving with touch
                ConstraintMouse2D constraintMouse = pickedNode.CreateComponent <ConstraintMouse2D>();
                Vector3           pos             = camera.ScreenToWorldPoint(new Vector3((float)args.X / graphics.Width, (float)args.Y / graphics.Height, 0.0f));
                constraintMouse.Target           = new Vector2(pos.X, pos.Y);
                constraintMouse.MaxForce         = 1000 * rigidBody.Mass;
                constraintMouse.CollideConnected = true;
                constraintMouse.OtherBody        = dummyBody; // Use dummy body instead of rigidBody. It's better to create a dummy body automatically in ConstraintMouse2D
                constraintMouse.DampingRatio     = 0;
            }

            touchMoveEventToken = Input.SubscribeToTouchMove(HandleTouchMove3);
            touchEndEventToken  = Input.SubscribeToTouchEnd(HandleTouchEnd3);
        }