2D Sidescroller with Contra-esque 8 way directional firing style

Hi folks,

i would like my 2D sidescroller character (moving on the x, z plane) to be able to fire in a CONTRA-esque 8 way directional firing ability, but no idea how to create this (especially since i can’t even get the 360 degrees setup to work properly).

Currently my character is firing (sometimes) in all directions (360 degrees), but… i ran into some big problems. I’ll show you 3 important blueprint sections and than explain the problem i got.


Here is the CHARACTER BLUEPRINT. In this section (Event Tick) i used this to determine which direction the sprite faces:


This is the section where i handle the firing of the gun. This is what i use to fire the projectile in the direction of the movement input.


And finally we have the projectile blueprint, where i use this to make it change its velocity vector depending on the direction my character is facing:


I have the feeling that the direction my character is facing and the directional movement input are disrupting each other. If my character movement is disabled (can move = 0) and i’m firing the gun, everything is fine, the projectile is being fired correctly in whatever direction i’m aiming (360 degrees).

But if i’m moving the directions are sometimes (for a split second) right and most of the time messed up (inverted) on both axis ( x , z ) that i’m using.

Any help would be greatly appreciated!!! :slight_smile:

I’ll see if I still have anything from a previous test project where I had implemented exactly what you’re talking about.

I know this isn’t an answer, just an acknowledgement that I might have something to help out.

I know this post is quite old but I am working on a Contra inspired game. But the aiming I am going for is a bit different in the side scroller view. I am using a cursor to get the looking at direction, which is also the aiming direction.

Here are some game mechanic videos,
Paragon TwinBlast at my Shooting Range Test - Weekend Side Scroller | #UE5 Devlog #15

Weekend Side Scroller | #UE5 Devlog #12