how to calculate bullet's fly trajectory?
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.
answered Jul 11 '18 at 10:32 PM
Nebula Games Inc
Follow this question
Once you sign in you will be able to subscribe for any updates here