Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
Tank Turret Controller (Camera sensitive)
   
Award
Favorite
Favorited
Unfavorite
Vehicles: Land, Mechanical
Microcontrollers: Calculation, Modular, Microcontroller
Tags: v1.3.2
File Size
Posted
Updated
90.562 KB
6 Oct, 2021 @ 9:19am
6 Oct, 2021 @ 9:56am
2 Change Notes ( view )

Subscribe to download
Tank Turret Controller (Camera sensitive)

Description
Velocity pivot for Left/right (A/D) rotation, robotic pivot for up/down (W/S) aiming.
Outputs and Inputs are labeled.

Includes:
Turret default angle offset so you can customize your firing arc.
Total Firing Arc in degrees so you can aim more up and down.
Camera sensitivity control (default 50) so a higher zoom level decreases A/D input for finer aiming.
W/S invert if your robotic pivot rotates the opposite way.

5x1x1 block size
11 Comments
Jhruio  [author] 18 Dec, 2023 @ 10:15am 
@Great Mighty Poo
I use a function to convert the reset input A/D from the seat into the output.
X = A/D input
Y = Zoom level
Z = Sensitivity Multiplier (higher is slower)
(x/2)/(((y^2)*z)-.3)
Zoom level (y) gets squared, multiplied by the sensitivity multiplier, then .3 is subtracted.
I forget why the .3 is there but it is likely related to some offset value.
This value contributes to a higher denominator. the higher the denominator the lower the value is after the A/D input gets divided.

I didn't do anything in the micro controller, as long as it is a velocity pivot, and high sensitivity reset A/D input on the seat it will likely have good response timing.
The idea is to have the input go from whatever your input is (-1,1) to 0 as fast a possible, usually just the sensitivity property of the seat.
RedDrake704 18 Dec, 2023 @ 9:51am 
How did you make it stop immediately when you turned the tower?
Jhruio  [author] 12 Sep, 2023 @ 11:35am 
@Capybara
Tank Turret Controller (Camera Sensitive)
Workshop is wonky with microcontrollers. Best fix is to relaunch game or alternatively wait a few minutes and refresh workbench. (Exit and enter)
and by a few minutes i mean a few minutes in some cases, best to relaunch and let steam download workshop files.
Capybara 12 Sep, 2023 @ 9:57am 
idk if ur still active but what is it called in game
Jhruio  [author] 7 Nov, 2022 @ 12:54pm 
this turret control is meant for a gunner position and therefore separate controls.
Alternatively you can use the arrow keys as an input source.
RedDrake704 7 Nov, 2022 @ 5:37am 
I meant that when you press S, the engine speed drops, but the reverse gear should turn on.
Jhruio  [author] 7 Nov, 2022 @ 5:30am 
increase mass of the chassis and decrease the mass of the turret.
RedDrake704 7 Nov, 2022 @ 5:28am 
I fixed it. Do you know how to make the chip not turn the tank and the engine without the lever work correctly?
Jhruio  [author] 7 Nov, 2022 @ 5:05am 
@manko.alexei check pivot type, vertical should be robotic.
RedDrake704 7 Nov, 2022 @ 4:00am 
Why does my gun lift up vertically?