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!!!