Weapon that follow the player

how to make a weapon that follows the mouse and is attached to the player that shoots

Do you mean a weapon that rotates around the player and points at the mouse?

Attached is the one you are looking for, it is often used in tanks and sentry tops
I hope it helps!
And use mouse move, in game coordinates and point at

yes i need that for my game

1 Like

Can you provide the link?

Basically, you need an object that can fit the player character in the middle. (If the player is 1x1, then the object will be 3x3).

This object is the one that emits the projectiles.

Use an Attacher to attach this object to the middle of the player, and have it rotate towards the mouse with MouseMove-Point at.

If you need anymore help, tag me here.

like this?

yeah like that just in a 2d game

1 Like

you have two options:
use the block attach.
spawn the sword, and extract its coordinates whilst the sword is pointing to the player

Attach is just better, no reason to have it be a spawned object