How to count ballistic curve?

Hi,
I have problem that I have aiming system using position, and I need to give the projectile some real looking ballistic curve. This are some basic points of what I need.

  • the part can be in any distance (inside gun max distance)
  • It must look really realistic
  • it must look realistic in any distance, so it wonā€™t be just same curve, but scaled
  • it will be really great, to have the curve easily changeable

But I donā€™t have any idea, so can you help me with the logic?

4 Likes

Check out

and

and

the search feature :wink:

3 Likes

I am in 7th class, so I really donā€™t understand integrals. Is there some way with easier math operations, or can you describe it to me?

That first thread already contains all the code for firing a bullet with a curve and code to predict the path of bullet, you donā€™t strictly have to know how the equations got there.

Ok, but from what I know from first few replyes is, that i know position, on that i am aiming, but i know position, on what i need it to land

If you want gravity to affect it, you can use body force

Ok, but there are much more aspect, than just gravity.

Ok, but i need to count the curve from target position.

There is also air, so it is slowing down, but also can go up, ā€¦
But main problem is this:

so i need to use maths.

You really donā€™t. Thereā€™s many resources out there that involves minimal math.

To calculate bullet trajectory (without math) you can use this resourced called ā€œFastCastā€, it has bullet physics (as highlighted by the post)

Iā€™m no expert (I really havenā€™t used this module), but if you do need help, maybe @EtiTheSpirit can provide you with further support. The docs should help you initially set this up.

For me personally, I learned some useful math by teaching myself, so you can be in a lower math level and still learn some useful programming concepts.

1 Like

This is what I am doing, I learned whole c#, lua, and some others myself, and now i am learning some basic math functions like sinus

Thatā€™s good, but you should learn the theorems and other important things, sine by itself requires learning the Law of Sines. Or with cosine you should also know Law of Cosines, that kind of thing.

1 Like

I tried to message @EtiTheSpirit and he saied, that this model can just simulate the ballistic curve, but canā€™t count it from target position.

Not stock, at least.

If you know how to do the math, you can manage it. Iā€™m not educated in this type of math personally, or I at least donā€™t know how to get force + initial velocity from displacement. Thereā€™s an equation out there. Just do some googling.

1 Like