Make a Weapon Follow the Mouse From the Center of a Position?

I want the game to be a top-down shooter, a lot similar to this game that I took inspiration from:
Spent Shells | Play on gd.games
I can’t seem to figure out how to get the wand to work, I want it to follow the mouse, and be in the center of the character, but it won’t work, the rotation you see below rotates the wand by the side and not the end of it like I want, and the wand is also not centered on the character either. I’m new to top-down games, so if you’d help me I’d appreciate it!

Make your wand horizontal image (Bottom of wand is on the left top is on the right)
Go to wand object properties and on the bottom edit points
Move both points center and origin to middle of left edge (so to very bottom of your wand which should be in middle of the left edge of wand image)

Now you use action rotate Wand toward position CursorX() CursorY()

I’ll try it out, but could you give me an example?

The points work but it doesn’t work how I want it to, it goes in circles in the spot it was given, instead of moving around the sprite.

Never mind, I got it to work! Thanks a bunch!

1 Like