harfang3d / dogfight-sandbox-hg2

Air to air combat sandbox, created in Python 3 using the HARFANG 3D 2 framework.
GNU General Public License v3.0
161 stars 47 forks source link

The missiles fail to hit the target. #72

Open KevinGrey opened 1 year ago

KevinGrey commented 1 year ago

I apologize for my unfamiliarity with GitHub, as I accidentally deleted the previous issue. Allow me to restate the problem I encountered and the temporary solution:

While configuring dogfight on the new workstation, I encountered an issue. When the target device locks onto the opponent and the missile device launches the missiles, they consistently deviate from the target and continue to circle around it, even when the opponent is flying at a constant speed without any turns. However, when I configured it on my desktop computer and personal laptop, it worked properly. You can find a video showcasing the issue below:

https://github.com/harfang3d/dogfight-sandbox-hg2/assets/20040974/04ebb0a3-3cb8-42a9-80b0-a82aef481f35

My temporary solution was to modify the "angular_frictions" value in the missile parameters https://github.com/ErkMkd/dogfight-sandbox-hg2/blob/69815f4804b87bf0ca250d2f49d371c6c9fc4dbd/source/missile_aim_sl.py#LL21C7-L21C7 and, as a result, I had to increase the value of "target_collision_test_distance_max" https://github.com/ErkMkd/dogfight-sandbox-hg2/blob/69815f4804b87bf0ca250d2f49d371c6c9fc4dbd/source/Machines.py#LL876C54-L876C54 to resolve the issue. Thanks for the previous responses from @astrofra and @ErkMkd .

KevinGrey commented 1 year ago

Additionally, during my exploration today, I discovered that the issue was likely caused by the graphics card, resulting in different effects of the same code on different computers. My desktop computer and laptop are equipped with integrated graphics card Intel UHD Graphics 630. The code on both machines uses default settings and can successfully hit the target. However, when using the NVIDIA graphics card for acceleration, this problem arises.