Stormworks: Build and Rescue

Stormworks: Build and Rescue

Master Slave Turret System
33 Comments
f18effect 26 Aug, 2023 @ 6:22am 
What if i wanted to make a turret with a laser and radar?
puipuix  [author] 12 Oct, 2022 @ 1:07am 
I didn't programe it. I don't know how you made your CIWS but you could override the calculated coordinate (should be composite 1 and 2) to add the speed of the target -> [x = x + delta(x) * time_to_hit_target; y = y + delta(y) * time_to_hit_target]
AegiusX3 9 Oct, 2022 @ 3:37am 
and how do i get it to lead the target slightly or aim straight at it instead of behind it?
puipuix  [author] 9 Oct, 2022 @ 2:57am 
Open the turret controller, near the top you should find a "=" node, increase epsilon to allow your turret to shot at a greater angle off the target point
AegiusX3 9 Oct, 2022 @ 2:29am 
I have been trying this for a CIWS, but it keeps lagging behind the target, and not allowing the gun to fire because of this
crae cochran 21 Apr, 2022 @ 11:48am 
never mind got it to work lol for some lesson
ReLIFE (schizo) 10 Feb, 2022 @ 11:40am 
Cant get this to work even with the manual aim logic, i have one turret that rotation does not properly on. And the other turret is spazzing out
Tuutikki 31 Oct, 2021 @ 9:03am 
Will do some more tests and see how everything behaves. Thanks for your help so far!
puipuix  [author] 31 Oct, 2021 @ 5:10am 
I don't clearly see who's attached to what but the velocity positive arrow should rotate right and the pitch pivot positive arrow should rotate up.
And I think you don't need to invert the compass sensor, but if it works like that you can keep it there.
To be honest I don't think you need to invert anything, except maybe the velocity pivot if it's upside down, but I think the rest should stay the same. Maybe you can try to cut/paste one of the example turret without inverting the blocks and then look if something seem to be inverted
Tuutikki 31 Oct, 2021 @ 3:54am 
Yes I think. Placed same way as in demo. Only thing difference is distance between compass and robotic pivot but I think that should not matter. My guess is I've made some idiot mistake here that I really can't see after hour and hours testing.
puipuix  [author] 30 Oct, 2021 @ 4:18pm 
Are the sensors close to the pivots ? If they are even few blocs away it can screw the calculations
Tuutikki 30 Oct, 2021 @ 2:05pm 
I am having issues to get this system work on my turrets. Everything works well but pitch of slave turret is ~10 degrees low of the target. My current setup is MASTER SLAVE TURRET RADAR --> MASTER SLAVE TURRET V3. Everything is on default settings except turrets are inverted upside down. I am really unable to debug my problem since on this example vehicle of yours everything works and when I copy setup to my platform pitch of aim goes all wonky. Yes, when I inverted turrets I corrected rotations to match correct ways and all sensors are installed using your turrets as example. Could you help me debugging this issue, please?
beepgroover 21 Oct, 2021 @ 1:57pm 
Although I just reassigned control from "wasd" to sight control and everything worked after some minor adjustments. All the same, the seat buttons control the aircraft, and I put a signal from the "seat emulator" on the guns)))
beepgroover 21 Oct, 2021 @ 9:50am 
It's a pity...
puipuix  [author] 21 Oct, 2021 @ 9:25am 
I see what you want, but I can't control the radar with the view, it would mess with the target leading system.
beepgroover 21 Oct, 2021 @ 9:07am 
And this is bad))) You have cool laser systems, but in the air they are useless - it is almost impossible to direct a beam at a moving enemy, and the distance between you and the enemy is constantly changing. The laser constantly needs to measure the distance, because there is no automatic target acquisition. All this is on the radar - it is much more practical and variable. But in a radar system, you don't have ballistics or third-person vision. It turns out 2 separate incomplete systems - the guns cannot work autonomously, and the radar cannot shoot and be controlled by the sight)))

puipuix  [author] 20 Oct, 2021 @ 11:47am 
Why do you want a static seat mode on the radar ? it's not view controlled
beepgroover 19 Oct, 2021 @ 8:29pm 
O! Button))) Get a dinosaur!
And can you also make the "static seat" mode on the radar module?)))
Tuutikki 17 Oct, 2021 @ 9:39am 
Cool! Will implement this as aiming computer. It's going to be awesome!!!
beepgroover 16 Oct, 2021 @ 6:35am 
Yes, adding scanning is not at all difficult, it's just an idea so that the creation is absolutely perfect))) But I myself cannot insert the ballistics calculation into the radar module, and there is no free space for the 2nd controller. But if it's hard to do, then okay. I'll manage somehow)))
puipuix  [author] 16 Oct, 2021 @ 4:48am 
What I did for my otomatic (radar SPAAG) is to make the radar controller control the yaw axis and the sight pivot, but the gun pivot is controlled by the slave-only controller. (Yes I was lazy to create a new controller :p)

You can also override the output of my controller with some switch. For example if no radar detection you override the radar yaw to make it scan around
beepgroover 15 Oct, 2021 @ 8:26pm 
But there can be a weapon on the radar too))) If the turret is stand-alone, how will it see the target?
By the way, for the automatic operation of the turret, you can also add a scan mode - constant horizontal rotation until the target is detected. And I can do it myself. But I can't do ballistics in any way)))

The button would be useful if it's not difficult. I block rotation with a connector, but sometimes it's not available)))
puipuix  [author] 15 Oct, 2021 @ 9:26am 
For the button it should be doable, I may add a way to change what input does what... might help

And for the gravity the radar don't do any ballistic calculation as it doesn't have a gun attached to. It only calculate the X,Y,Z coordinate of the target
beepgroover 15 Oct, 2021 @ 8:02am 
And how do I adjust the "gravity" on the radar tracking module?
beepgroover 14 Oct, 2021 @ 8:08pm 
Great set! I want to use it))) But is it possible to add 1 more button - reset to 0? Returning the turret to the position of the course gun. Preferably on a radar tracking module.
I promise a wise dino)))
puipuix  [author] 13 Oct, 2021 @ 2:24pm 
Yeah, this MC is just math with even more math, it hurt my head lol
line 13 Oct, 2021 @ 2:14pm 
all i hear is math teachers here
puipuix  [author] 13 Oct, 2021 @ 7:12am 
they work in sync where ever they are. Each turret is using it's own gps, altimeter and tilt sensor so aim at the 3D point calculated by the master turret.
Tuutikki 13 Oct, 2021 @ 3:11am 
Exactly the thing I was looking for! Nice. Is it necessary to keep turrets in current formation or does they work in sync where ever they are? I am trying to reverse engineer what you did here and form suitable solution for my plane out of this system.
Vapor4049 11 Oct, 2021 @ 1:21pm 
Was trying to figure this stuff out for myself, well making the turret point in the right direction at least for now. After having a look at this system, i'll just use this... This kind of trigonometry is beyond me. Thanks for putting it up.
puipuix  [author] 9 Oct, 2021 @ 2:29am 
I calculate the coordinate (x,y,altitude) of where the camera/rangefinder is looking, then I use a formula (you can find on wikipedia) to know the angle for the gun to aim at the coordinate
Bluerobot11 8 Oct, 2021 @ 1:00pm 
how are you calculating the offset elevation for the rangefinder? what formula are you using?