Gun follow mouse cursor (arcade shooters style)

Hello everyone . I’m trying to do a gun system like “Rambo the videogame” , so the gun follow the mouse cursor , i tried my best but i’m stuck real bad and there aren’t any tutorial about that. Thanks in advance and sorry for my bad english.

Hey @EDUGHOST31! Welcome to the Forums!

To get things started, am I correct to assume that you already have the other elements of your rail shooter already set up? After taking a look at the gameplay, it looks like the gun is purely a cosmetic rotation that depends on screen position. Can you share what you have so far with us?

Any additional specifics you can provide may go a long way in solving your problem.

@Quetzalcodename thanks for replying . So far I have created what would normally be done for an FPS game, therefore: a Head bob system, a shoot system …etc.

I also tried to implement the mechanics of an arcade game but with very poor results, as you can see.
I honestly don’t know what to do and I hope you can solve the problem.
I won’t go into too much detail as I don’t trust Google Translate too much and I’m available for any doubts about the project.

video about the problem

Hey @EDUGHOST31,

Are you making an arcade/rail shooter or an FPS? If you are making an arcade/rail shooter, I would start with you’re mechanics before attempting to make the gun move the way you are wanting. Check out this non-Epic tutorial series to help get you started:

Hey @EDUGHOST31!

Checking in! Were you able to convert your mechanics that you have so far to an arcade shooter so that you are using screen space instead of 3D movement?

@Quetzalcodename yes i did it , and i also did a shoot system (so i shoot at mouse position), now i’m trying to do an enemy