Drag to shoot in a 2D Top Down game | Help

I am a complete novice when it comes to Unreal. I was just wondering if anyone could help direct me to any tutorials or answers to create a drag and release shooting function like seen in the game “Oregon Trail.”

Link to what I want to make

Any information (videos or documentation) would be a great help. Thank you for your time.

How does it work?

  • do you drag from player location towards enemy?
  • do you drag from any location in any direction?
  • something else?

you could click and drag from any location, that is what is happening in the video above. The cursor location doesn’t matter. When you hold left click, you can then move the mouse to aim the reticle around the player. then on release a bullet would fire in the direction of the reticle.

See if this works for you:

  • a function that traces from the camera and gets cursor location in the player’s world plane:

  • we trace when the mouse goes down, and then up:

  • and spawn a very standard projectile:

Thank you so much for your help Everynone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.