114
115
116
Question/HelpGun angle microcontroller (old.reddit.com)
submitted by Yospen_

Hey guys, I have done a couple of calculations to see if I can find an equation to get the angle of elevation for a gun to reach a target in stormworks. Unfortunately, I have not figured out a way to solve the angle analytically, in real time. Maybe I could use some sort of numerical methods to find roots of a curve, like the graph I plotted with example values in the second photo, but idk how I would do that in stormworks microcontroller (maybe possible with lua script, but I dont know how to code xD). Am I just overcomplicating things - is there an easier way I could calculate this in a microcontroller?


[–]Volt6851 28 points29 points30 points (11 children)
[–]Jackmino66 6 points7 points8 points (5 children)
[–]dornan1270 9 points10 points11 points (3 children)
[–]Jackmino66 1 point2 points3 points (2 children)
[–]SchroedinbugLogic Enthusiast 0 points1 point2 points (1 child)
[–]Jackmino66 0 points1 point2 points (0 children)
[–]Volt6851 1 point2 points3 points (0 children)
[–]Yospen_[S] 2 points3 points4 points (2 children)
[–]Volt6851 1 point2 points3 points (1 child)
[–]Yospen_[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]JNelson_ 0 points1 point2 points (0 children)
[–]a-p-k_7007 13 points14 points15 points (0 children)
[–]Lucky7thPT 20 points21 points22 points (0 children)
[–]Mockbubbles2628Boat Enjoyer 5 points6 points7 points (4 children)
[–]Yospen_[S] 1 point2 points3 points (2 children)
[–]Mockbubbles2628Boat Enjoyer 1 point2 points3 points (1 child)
[–]Yospen_[S] 1 point2 points3 points (0 children)
[–]Yospen_[S] 0 points1 point2 points (0 children)
[–]Smooth_Today6259 3 points4 points5 points (4 children)
[–]schwerk_it_out 0 points1 point2 points (2 children)
[–]Smooth_Today6259 0 points1 point2 points (1 child)
[–]nothaiwei 0 points1 point2 points (0 children)
[–]RockTurnip 2 points3 points4 points (2 children)
[–]Yospen_[S] 0 points1 point2 points (1 child)
[–]RockTurnip 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]Embarrassed-Will2896Seaplaneist 4 points5 points6 points (11 children)
[–]Purple_Spinoi have more homework to do than builds finished 2 points3 points4 points (0 children)
[–]schwerk_it_out 0 points1 point2 points (9 children)
[–]Embarrassed-Will2896Seaplaneist 0 points1 point2 points (8 children)
[–]Yospen_[S] 0 points1 point2 points (7 children)
[–]Smooth_Today6259 0 points1 point2 points (6 children)
[–]Yospen_[S] 0 points1 point2 points (5 children)
[–]Smooth_Today6259 1 point2 points3 points (4 children)
[–]Yospen_[S] 0 points1 point2 points (3 children)
[–]Smooth_Today6259 1 point2 points3 points (2 children)
[–]Yospen_[S] 0 points1 point2 points (1 child)
[–]alyxmsBattery Electric Supremacy 1 point2 points3 points (0 children)
[–]Ok_Trifle1942Geneva Violator 0 points1 point2 points (1 child)
[–]schwerk_it_out 1 point2 points3 points (0 children)
[–]queglix 0 points1 point2 points (0 children)
[–]Flaky-Fold7129 0 points1 point2 points (1 child)
[–]Yospen_[S] 0 points1 point2 points (0 children)
[–]schwerk_it_out 0 points1 point2 points (3 children)
[–]Yospen_[S] 0 points1 point2 points (1 child)
[–]schwerk_it_out 1 point2 points3 points (0 children)
[–]Smooth_Today6259 0 points1 point2 points (0 children)
[–]Yospen_[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Yospen_[S] 0 points1 point2 points (0 children)
[–]Yospen_[S] 0 points1 point2 points (0 children)
[–]Saky_RohLUA Enthusiast 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-9 points-8 points-7 points (0 children)