hey,

I want my cannon sprite to be able to move when I move my mouse on the X axis.
atm I have this:

MouseState curMouse = Mouse.GetState();
            Vector2 mouseLoc = new Vector2(curMouse.X, curMouse.Y);
            mouseLoc = cannon.position;

but that doesnt work.
any ideas?

If you want the cannon to move, set the cannon position, not the mouse position.

I want to hit myself in the head sometimes.

thanks alot it worked :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.