- Joined
- Aug 1, 2013
- Messages
- 4,658
Hi all.
I am writing a missile system that allows easy control over collision filtering, allows you to give a maximum distance or duration to the missile, use an existing unit as the missile, allows multiple collision types, uses 3d distance rather than 2d distance and thus allowing to shoot straight in the air (flawless).
And you are all free to give more suggestions ofcourse.
The problem is that I lost my sense of logic when I want a perfect smooth curve.
Missiles can be fired with a startoff arc. Then the missile must determine how much it should decrease it's arcing (every 0.03 seconds) to land with the same impact Z-angle as the startoff Z-angle.
So I figured that the missile should have dropped to 0 degree by the time it reaches half the distance.
So I know the starting location (x,y,z) and the targeted location (x,y,z) and know the startoff Z-angle and the speed (over the curve not over the ground).
How do I calculate how much degree the missile should drop in one second (so I can do *0.03)
This will be a autocalculator for physical objects like arrows... except that they still have yet to gain gravity effects.
So this calculation will be made at the creation of the missile and if someone decreases the missile speed, the arrow would hit the ground before it reaches it's target point and if someone would increase the missile speed, the arrow would reach further.
I am writing a missile system that allows easy control over collision filtering, allows you to give a maximum distance or duration to the missile, use an existing unit as the missile, allows multiple collision types, uses 3d distance rather than 2d distance and thus allowing to shoot straight in the air (flawless).
And you are all free to give more suggestions ofcourse.
The problem is that I lost my sense of logic when I want a perfect smooth curve.
Missiles can be fired with a startoff arc. Then the missile must determine how much it should decrease it's arcing (every 0.03 seconds) to land with the same impact Z-angle as the startoff Z-angle.
So I figured that the missile should have dropped to 0 degree by the time it reaches half the distance.
So I know the starting location (x,y,z) and the targeted location (x,y,z) and know the startoff Z-angle and the speed (over the curve not over the ground).
How do I calculate how much degree the missile should drop in one second (so I can do *0.03)

This will be a autocalculator for physical objects like arrows... except that they still have yet to gain gravity effects.
So this calculation will be made at the creation of the missile and if someone decreases the missile speed, the arrow would hit the ground before it reaches it's target point and if someone would increase the missile speed, the arrow would reach further.