# 2.5D but shoot projectiles along 2D arc around character

**URL:** <https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [October 23, 2024, 4:29pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249 "2024-10-23T16:29:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 23, 2024, 4:29pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/1 "2024-10-23T16:29:54Z")

</div>

My Daughter & I are making a game and new at it. We have gotten the charachter to do every attack we want except keeping the projectiles locked in a 360 degree plane around the character…regardles if the character walks up or down streets of rage/cult of the lamb style…but with gun projectiles…the forces tje character to be on the same left/right plane as enemys & or airborn enemies & shoot them out of the sky.

The character currently shoots almost inline with the mouse/future joystick…but also will shoot 3-dementionally away from camera or twords camera.

I believe the line intersect on the mouse needs a invisible plane that follows the character or some other method of aiming??

Short video shows the can to right can be shot (or if it was in air-it could NOT be because of 3d aim issue) and then the 2nd can in 3d space is able to be shot when we dont want it to be. Any help would be greatly appriciated.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 23, 2024, 5:01pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/2 "2024-10-23T17:01:35Z")

</div>

You’re looking for `Line Plane Intersection`:

Some examples:

> [@Left Mouse button pressed and released equivalent in enhanced input (or drag and drop)](https://forums.unrealengine.com/t/left-mouse-button-pressed-and-released-equivalent-in-enhanced-input-or-drag-and-drop/1633884/18):
>
> Here’s some script allowing for picking up stuff and moving it in a specific plane only we determine ourselves manually: The green debug plane visualises what’s going on. In short: shoot a beam (trace) from the screen centre towards the projected mouse cursor, when it eventually intersects that plane (which is infinitely large), place the actor at the intersect world coordinate. If I change the normal: You could derive this Normal from the actor itself instead:

> [@Homeworld style rts control](https://forums.unrealengine.com/t/homeworld-style-rts-control/1353390/6):
>
> for a horizontal plane: for a vertical plane: we trace against horizontal unless a modifier key is held: More is needed to make it better. You could restrict axis for vertical adjustment like in @pezzott1’s example. Debug:

> [@Vector Calculation Question](https://forums.unrealengine.com/t/vector-calculation-question/479311/2):
>
> In the Player Blueprint: [[Image from Gyazo]](https://gyazo.com/77f913b00b1fb8b17e7b695e68f6c6dc) The method is completely geometry independent. No depth was specified in the request so I’ve used player’s current location rather than ground level. Depending on how it will work in the game (elevation, landscape complexity, slopes… this may need to be adjusted by shifting Plane Origin). In short: create an up-facing plane at player location trace from the camera to the mouse cursor projected into the world when the trace…

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 23, 2024, 5:57pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/3 "2024-10-23T17:57:43Z")

</div>

> [@Line Trace from a 3d point to mouse location](https://forums.unrealengine.com/t/line-trace-from-a-3d-point-to-mouse-location/237661):
>
> I’m making a 3d side-scroller game and I want to do a line trace from the character glasses to wherever I click on the screen with the mouse. I want this trace to stay on the same plane as my character, so the X value of the start point & end point should be the same. This is the best I could do, but it’s not accurate - When I click roughly in the center of the screen the trace is pretty accurate, but when I click further away from the center it gets less and less accurate…So…What am I doing w…

This is what got me here! Thanks so much exceptionally fast response, Ill try it later tonight when I get home, and report back! This has gotta be the missing piece of the puzzle!

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 3:00pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/4 "2024-10-24T15:00:40Z")

</div>

I guess I already had this & can show the Plane with the debug. (Huge THANKS to @Everynone so many of your guides/assistance here in the forum have gotten us so far!!!) The plane follows the characters socket and everything already I just had it visually off.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/d/bd65ce87197e4260352952f46b237c2134855659.jpeg)

I just can’t get the projectiles to consistantly follow the mouse intersect with this setup after multiple attempts I believe is the only issue. Ill post the projectile setup later if I get a lunch today.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 24, 2024, 3:14pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/5 "2024-10-24T15:14:44Z")

</div>

The `Plane Normal` should be `0,0,1` if this is a top-down view. Assuming you want to hit any of those:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/1/9215f79f7d54fe251ffe5362c1e99052b293da20.jpeg)

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 3:26pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/6 "2024-10-24T15:26:26Z")

</div>

We want it to be Side Scroller style, and not be able to shoot the top can at all. Just a flat 2D plane of shooting. If going to shoot the top can have to walk up there and be parallel with it ( only able to shoot left/right/arc up around)

So just like any basic sidescroller locked to a single plane, but also able to walk around with that plane

Makes for an awesome mechanic of juggling the cans in the air with projectile hits… and if not aligned on the same plane… you have to dash up or down in 3D space to keep juggling comboing the cans…increasing your strenghth for melee combos.

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 3:33pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/7 "2024-10-24T15:33:32Z")

</div>

Exactly like you did a video for here, but character can walk/dash in a 3D space.  
[Line Trace from a 3d point to mouse location](https://forums.unrealengine.com/t/line-trace-from-a-3d-point-to-mouse-location/237661)

The last video here for the aim & just need projectiles to follow it eventually for joystick but mouse works for now 🙂

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 24, 2024, 3:43pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/8 "2024-10-24T15:43:32Z")

</div>

I can’t recall how the axis were set up in the template, and can’t see it in your world. Maybe you need 0,1,0 as normal. Draw that plane to visualise it - it may be set to fully transparent here.

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 4:04pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/9 "2024-10-24T16:04:14Z")

</div>

Yes I turned the plane color on/increased the alpha and its a perfect wall with the character in front, looks perfect (just like the previous post/video you made!) Its just the projectiles will not stay aligned with that plane…the projectiles act like a top down and not a Side Scroller like we want…even though we can walk through a 3D space…Ill try to post the blueprint to make more sense of it and have searched high and low for weeks for blueprints or a similar game and hope we can get this going, its like the last piece of the basic mechanics we were wanting.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 24, 2024, 4:23pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/10 "2024-10-24T16:23:15Z")

</div>

If you need help, you may need to demonstrate how the projectiles are fired.

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 4:28pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/11 "2024-10-24T16:28:32Z")

</div>

Yes I realize I should have done a better video and will get one asap

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 24, 2024, 4:44pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/12 "2024-10-24T16:44:39Z")

</div>

is this how it’s supposed to work:

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 5:30pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/13 "2024-10-24T17:30:47Z")

</div>

Yes this is perfect!  
My camera/spring arm angle to character is slightly diffrent is all, almost like Cult of the Lamb.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 24, 2024, 7:33pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/14 "2024-10-24T19:33:29Z")

</div>

30 degree limit which way? Up? And we can’t shoot behind? What happens when we do aim behind, where do we keep shooting anyway?

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 7:47pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/15 "2024-10-24T19:47:59Z")

</div>

No this is perfect!!

I was just saying, the only diffrenct is the spring arm + camera angle to my character is at about 30 degrees.  
So projectiles in your example are perfect 👍

I will post my projectile blueprints asap

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 24, 2024, 8:25pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/16 "2024-10-24T20:25:06Z")

</div>

This is the basic projectile/bullet blueprint

 ![BP_SHerFish_Combat_00002](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/a/8/3a87ebec7742e95864706cbc8f7472675f900ae3.png)

This is one of my many failed attempts to get the bullet to just shoot at the mouse cursor.

 ![BP_SHerFish_Combat_00003](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/9/f29220e39434bdb050b1cd9dc905f2c098657975.jpeg)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 25, 2024, 7:10am UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/17 "2024-10-25T07:10:55Z")

</div>

No need for any of this. Find look at rotation at the intersection and rotate the bullet as is. There’s no tracing needed either.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [October 25, 2024, 1:44pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/19 "2024-10-25T13:44:14Z")

</div>

What you’re doing is _unsafe_ and may backfire under certain conditions; avoid accessing stale data from other execution chains - cache it if _must_ use it this way. While this is running on Tick, it will be fine _here_ (most likely) but is simply bad practice.

* * *

And, as mentioned above, none of this is necessary - especially the trace. You already have all the data you need. No need to complicate things and waste cycles.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/9/f09b29812c4088ea678ce8ea15b77e2fb03f9757.png)

Note that you do not need to run this every frame either, not for what we see above.

Just sayin’ Good luck!

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 25, 2024, 3:04pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/20 "2024-10-25T15:04:32Z")

</div>

Thank you again, I knew there was a easier way to do this and avoid tick, just happy to finally get it working, Ill try this out, thanks again!

---

<div class="post-metadata">

**Author:** ![SolariumScum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SolariumScum](https://forums.unrealengine.com/u/SolariumScum)\
**Post date:** [October 26, 2024, 4:36pm UTC](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249/21 "2024-10-26T16:36:23Z")

</div>

I could only get the result I wanted by doing this:

 ![BP_SHerFish_Combat_00006](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/6/4b6b1ea96604734faf56737c6646242236fbe60e.jpeg)

I also would like to acomplish 2 more things with it:

1. Get the mouse cursor/target to only pop up when holding a button down \<-(easy) then to “Aim” & the Paper ZD actor to 180 & face the “Aim/Target”…  
-The template I used has the spring arm rotate with the Paper ZD character, and using any Hit Result location/impact point \> find look rotation \> rotate actor also flips the Spring Arm/Camera…

Trying to keep this template camera setup, I cant seem to keep the camera from flipping to the opposite side of the character.

Heres some of the template camera normalizing function:

 ![BP_SHerFish_EventGraph_00000](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/2/4c25a157366bdc5fb6d20b756069835804042b8a.png)

1. I also will add the aim/target at a set distace from the character upon holding aim button in future as you had shown me here in this thread thanks for that too!

[Next page](https://forums.unrealengine.com/t/2-5d-but-shoot-projectiles-along-2d-arc-around-character/2083249.md?page=2)
