This project has moved. For the latest updates, please go here.

Attach body to Mouse in Monogame

Topics: Developer Forum, User Forum
Sep 5, 2014 at 8:36 PM

I am new to Farseer / XNA. I am working on a top down game which involves revolving a character around a point. How this basically works is that the character will be attached to the mouse from the beginning and as you move the mouse or rotate it, the character rotates and swings around the point it is attached to the mouse so that hits the enemies with this swinging movement,

So the questions are
1) Can i use a mouse joint to connect the player to the mouse from the beginning.

2) I also noticed that the Revolute joint did not work without the gravity(the object wont rotate), is there a way i can make it work by disabling the gravity since technically the gravity is going to act in the Z axis because it is a top down game.

For reference you might want to check the "collision categories" in the monogame sample and try revolving the body with the mouse. That is the effect i am looking for.

Thanks in advance.