Shooting bullets at an angle?

Hey all I’m trying to make my bullets shoot at an angle but can’t seem to get it to work. I’ve fiddled with a few nodes but to no luck.

It’s a top down shooter and when the player picks a buff then the bullets come out as three. One in a straight line, one going off left at a - degree angle and one going off right in a positive degree angle.

The red lines on the image are just showing how I’d like the bullets to fire, not pointing at anything specific.

In the image you see just a simple spawn bullet on the socket joint and that one fires forward like normal. Now I can make the other two fire forward but when I fiddle with rotation settings it does nothing. Tried all sorts of settings.

If anyone could help I’d appreciate it.

For now I only set it to fire one as I was just testing if I could make that one bullet shoot in a positive or negative degree angle but I can’t. I can make it offset to the left or right of the socket but just not at an angle.

Thanks :pray:

Hi! If you add an angle here:

image

like 45.0 in some axis, the spawned bullet should come off at that angle.

can you share the movement logic of the spawned bullet?

1 Like

I’ve tried putting in an angle there and nothing happens. Also it’s just the standard first person shooter content but I modified it for my top down like spawning it from the socket and not have the camera influence it’s spawn (like the first person standard).

Currently pc is off. When I click the shoot button it spawns the bp projectile.

I hope this helps

1 Like

I will give it a try but that’s basically what I am doing. I’ve tried splitting the structure pin of the rotation and adding -45 or 45 along the x rotation and it still just went in a straight line.

maybe the problem is not in the spawning but in the movement of the bullet in the bullet actor.

is the bullet moving with LOCAL offset? because if is moving with WORLD offset, it will always move the same direction, no matter the orientation of the actor.

I am so stuck this is the settings in the projectile and it has initial velocity in local space ticketed.

And as you can see I’ve set x to 45 degrees but nothing it still shoots straight.


Got it working with a mixture of your solutions plus making it 45 degrees or negative in both x and z as it’s a 3D space just with top down camera.

Idk it just works xD thanks for all your help you helped me get there. Was banging head on wall.

I think why it didn’t work when I was putting random numbers in the rotation last time was cause it wasn’t set to local space.

Cheers!!!

1 Like