Tilt-proof Autoaim Railgun
PLEASE UPVOTE IF YOU LIKE IT
please download from this link, it fixed some minor errors.
.
First of all, I would like to thank @SnoWFLakE0s and @krevedkopro for their help and information.
Part of the codes are based on @krevedkopro calculation, while I add my own solutions as well so the code is considerably shorter.
Unlike my previous railgun, this one no longer uses a PID function for aiming.
Introducing another member of Instantly delete your enemy series !
Aircrafts, tanks, warships, anything that can be locked, it stops existing anymore once you pressed the button.
Tilted terrains are no longer a problem, and shooting while moving at 100 km/h is just easy, come hell or high water, it's here to delete your enemies.
The vehicle is equipped with speed control program , you set the desired speed with throttle input,it will automatically adjust engine power to maintain it.
.
Controls
To fire, go to air-to-air or air-to-ground mode, select a target and hold Fireweapon button until it fires.
Roll: steering
Throttle: sets the cruising speed, 50% throttle = 90km/h, 100% throttle = 180km/h.
AG1: switch to a larger caliber with lower muzzle velocity (default gun 6000m/s, AG1 gun 600m/s )
.
A simplified version with normal cannons instead of railgun, in case it doesn't work well on mobile.
http://www.simpleplanes.com/a/HW8uEa/Autoaim-simplified
.
Demo video at https://www.bilibili.com/video/BV1154y1h7HD/
.
Rotators for autoaiming are intendedly painted orange, you are welcome to take them and study or use it for your own works ^_^
UPVOTE IF YOU LIKE IT !!
Specifications
Spotlights
- hfusiwjf29 3.7 years ago
General Characteristics
- Predecessor PID Autoaim + Railgun prototype
- Successors 3 airplane(s) +28 bonus
- Created On Windows
- Wingspan 41.1ft (12.5m)
- Length 70.8ft (21.6m)
- Height 32.4ft (9.9m)
- Empty Weight 31,703lbs (14,380kg)
- Loaded Weight 44,124lbs (20,014kg)
Performance
- Power/Weight Ratio 0.305
- Wing Loading N/A
- Wing Area 0.0ft2 (0.0m2)
- Drag Points 45882
Parts
- Number of Parts 301
- Control Surfaces 0
- Performance Cost 1,464
Please download from this link, it fixed some minor errors.
https://www.simpleplanes.com/a/2R30GS/Autoaim-Railgun-v1-1
Cool
Would it be possible for you to make an auto turret like this but for aerial gunships and bombers? I've been making a bomber for a while now and I've been trying to look up for any good auto turret codes for the rotators, but I haven't been able to find any that can work for my design. Can you help me out?
@JoshuaW
B站来的i了i了😂😂😂
@joshuaW
hello again. I'm back to auto aiming now, and still can not catch what you did with vertical aiming.
(see your answer beneath)
Which way global CS affects all this, if at the stage of aiming angle definition we works fully in relative CS?
Why you calculating vehicle top vector, if in relative CS it's a constant {0,0,1}?
I've tryed using just formula for angle between vectors: cos(a) = dot product / product of lengths, but the result is just barrel shaking.
P.S. i would be grateful if you can contact with me in discord for more convenient communication: kerved#9113
I took your railgun as a subassembly,put it on P-51 and in dogfight,i have 1-shot a target that was 22 km away!
How can I adapt the codes for use with wing guns?
@WIZARD2017 use this one for tanks
@TankerWithATankard Thanks, that was exactly what I tried but failed
诈尸了?忘了你是谁了???只记得你的FA2,药丸
@krevedkopro First of all I'd like to thank you again for your document.
The general idea is calculating the angle between target vector and vehicle top vector (local (0,0,1) in global CS) using a dot product.
To get that top vector, I calculate the cross product of vehicle right vector(1,0,0) and vehicle front vector(0,1,0), with the sin(right,front) fixed to 1 it's an easy job.
Most important, this method avoid the issue of atan(0/0) that would occur according to your document.
@JoshuaW can you pls explain your method for vertical rotator? i don't have neither time and desire to do reverse-engineering, but it looks interesing.
太帅了
@JoshuaW i did but no button appears
@Ruskiwaffle1991 you need to switch to air-to-air or air-to-ground mode to use a weapon
@JoshuaW no fireweapon button shows
@Ruskiwaffle1991 it should work in most cases, remember to hold the fireweapon button until it fires.
aw, it won'5 work on mobile :( i want the railgun
@DogstenAnkleheigh select a target and press fireweapons button for at least 1s
How do i shoot it though @JoshuaW
Cool build @JoshuaW @2
@SnoWFLakE0s @krevedkopro Guys come check this out, I made it with horizontal rotator based on @krevedkopro calculations and vertical rotator with my own method, making the codes considerably shorter, and it works very well.