How to calculate bullet's fly trajectory?

I really would like to teach bot to fire at long distances. Do anybody know how to calculate or/and draw bullet’s trajectory (bullet has default physics).

You can use a spline mesh component that will reduce the height of each point as they get further from the player, based on a bullet drop strength you can define.

You can also use this spline to move a bullet-sized colliding actor along the spline to determine where a blocking hit will occur. Similar to a line-trace, but arcing. This also allows you to draw something along the spline to show where the bullet will travel before you fire (assuming nothing gets in the way between the time the bullet is fired and it reaches its target). This draw can be scaled between the AI and the colliding location determined by the spline collision check.

EDIT: I am advocating that you move the bullet along the predetermined spline, rather than rely on physics/gravity to bring the bullet down, purely for accuracy of determination.

Hey @RenegadeCash436, I think I have a tutorial that will help you figure most of this out. You probably will need to modify some stuff for your particular purposes not sure what you mean exactly by “teach a bot to fire at long distance” but this tutorial will show you how to use physics trajectories to create an arched path for a projectile, how to add a tracer to that path to show where it will land and there is an extra tutorial showing you how to draw out the arc path if you desire. I have linked you to the first video. Hope this helps.

Can you describe your method more detailed? I’m beginner in using unreal engine, so I can not sort out splines on my own. Also english is not my primary language. Thank you very much!!!

Thanks, my problem now is partly solved! But the idea is another. Do you know WoWs or WarThunder? I want my bot to be as wise as those games bots. It can already turn to me in any direction and predict my move, BUT bullet falls down because of gravity.

No not familiar with those games sorry. But what exactly are you trying to achieve? “Smart bots” is a little more complicated than simply predicting a bullets path. That is getting into AI

I want my bots to consider ballistics of bullet. For example, there is a plane, who flies on 10000 height and AA gun, which sees it. AA gun calculates place, where will be plane, when bullet will fly to the plane( bullets speed* distance to plane). and miss, because bullet falls down 'cause of gravity. I want gun to consider this ballistic. If you played WoWs, than you know, that player just select place he wants shells to drop, but computer calculates firing angle on it’s own, taking care of damping, distance and shell’s speed.
the only thing player must do - think about time, which shell needs to fly to target. Hope You got it!!!

There is a BP node called “predict projectile path” or something similar. You might want to look into that, you would just have to tie that in with some functionality to also predict enemy movement before firing.

maybe, but how will I calculate the Tower’s Pitch?

It doesn’t help, or I am stupid:)

What do you have so far? It is hard to help further if the basic nodes aren’t working without screen shots of your set up and a more detailed explanation of the effect you are achieving. I think I get the effect you WANT but I don’t know what the issue is or how to help because all you tell me is “it doesn’t qork”. What doesn’t work? What part specifically? The bullet flies in an arc but it’s the wrong arc? The bullet over or under shoots the target? Etc etc