Hello. So recently i’ve been working on a weapon in my game, and i’ve ran into a giant problem! Whenever I shoot the bullet, it goes the right way when i’m not ADS, but when I am ADS is goes a different direction. Also, the bullet doesn’t rotate up and down no matter if I put impulses or whatever.
(notice that it goes perfectly straight but the only problem is that it is not going up or down.)
With ADS: (notice that the bullets are curved left and that it doesn’t move up or down.)
So I have two different problems, but I am move focused on how to fix the rotation, and with that, how do I fix it so it goes up and down too. I’ve ran into the up / down problem before, but not this rotation problem! Thank you.
Aim down sight. That means when I right click, it does a rifle holding animation. Usually for when holding a weapon like a machine gun, it does that animation. As you can see in the second picture, I was doing that rifle holding animation.
I wonder if they only LOOK straight in top down but are actually just as tipped up.
So maybe if you fix it in ADS it will fix it all.
Did you import the bullet model? If so what does its X axis look like and does the bullet shape face exactly forward along that X axis?
Rotating the bullet does not change the direction. The ADS works for all my other guns, but it is only this one. Even if I rotate the weapon, it will change the bullet direction, but ALSO the gun and I like the way my gun looks. Also, if I rotate the gun, it will change the way that the bullet shoots when i’m not ADS.
So is the rotation direction or the travel direction of the bullet what’s wrong?
The rotation of the bullet is wrong. Whenever I shoot the gun when right clicking it goes the wrong direction (it goes right as you see in the 2nd picture). But when i’m not right clicking, it shoots in a normal direction (just not going up and down).
Do you have two different pieces of code which both spawn the bullet? You should probably put that into a function and only have one, so that it works exactly the same either way.
What does your code look like for both the ADS and top-down versions of shooting?
I don’t have it in one function (i think). I’ll fix it up. I think I know what to do now.