Profile image

Gun stabilizer

344 Ectogaming20  4.4 years ago

So ive been toying around with gun stabilizers and have successfully built a tank with a gun stabilizer. But i also want so that, at the press of an action group, the stabilizer stops and the gun instead stays at the same angle relative to the hull. Any ideas? Is it even physically possible?

  • Log in to leave a comment
  • Profile image

    @SnoWFLakE0s But no way will u be able to teach them Horizontal Stabilization 😂

    11 months ago
  • Profile image

    I @SnoWFLakE0s I found the simplest up and down line to be :
    (VTOL-(CUSTOM NAME FOR PITCHANGLE IN PART OUTPUTS/(THE ANGLE OF THE ROTATOR in parts edit like 90* or 45*)

    11 months ago
  • Profile image
    7,323 WarringMunky

    @RavenG59 (a) seems to be a number representing how much PitchAngle is multiplied by in the equation. He's saying that finding that number is dependent on the particular build.

    Edit: wow old question

    2.1 years ago
  • Profile image
    1,902 RavenG59

    @SnoWFLakE0s what do you mean with (a)....?

    4.1 years ago
  • Profile image
    331 Kirby144p

    @Minecraftpoweer Can the gun elevate the full 20 degrees relative to the tank when going up a hill?

    4.4 years ago
  • Profile image

    @SnoWFLakE0s not really, I dont really understand this stuff haha

    4.4 years ago
  • Profile image
    66.7k SnoWFLakE0s

    @Minecraftpoweer
    .
    Ah, so you're stating an issue with maximum possible elevation and depression. That's easily solved. We can just make the input of the elevation rotator something like (Trim - PitchAngle*a), where a is some constant you find yourself (depends on your build). Then you can make sure that the max elevation is [Stabilizer-induced elevation] + [User-controlled elevation - Stabilizer-induced elevation]. Does this make sense to you?

    4.4 years ago
  • Profile image

    @SnoWFLakE0s I don't think I explained the issue well enough.

    So the stabilizer is like it should be. And on that you put another rotator to make the gun up up or down. And that is connected to the gun. So basically.
    [Stab] > [Elev] > [Gun] and since the elevation control is on the stabiliser when you go down a hill the gun elevates extra.
    .
    On flat ground it works as intended, the gun stays at the elevation you put it on.

    But if you go down hill the stabilizer will stay as leveled as it can (let's say 20°) and if you are elevating the gun at the same time that's another 20° because how everything is connected. ( first stab, then elev and last gun) so that basically makes it 20+20

    4.4 years ago
  • Profile image
    66.7k SnoWFLakE0s

    @Minecraftpoweer
    .

    only worked if the gun was facing the same way as the cockpit (could be fixed if the cockpit was on the turret)

    True, and this is indeed limiting in some ways. However regarding this-

    the max is 20 on the stabilizer and on the elevator rotator and if you're going down a hill it could still go up to 40

    I'm not exactly sure why you had that issue. If you want to limit your stabilizer's range, just change the min/max on the clamp function. Not hard at all. Instead of the original- clamp(PitchAngle*0.01, -1, 1), you can just do clamp(PitchAngle*0.01, -0.5, 0.5) to limit the max dep/elev to 45º on a 90º range rotator.
    .
    For gun elevation, just add a hinge rotator. Nothing too hard there.

    4.4 years ago
  • Profile image

    @SnoWFLakE0s nah the problem with it was that it only worked if the gun was facing the same way as the cockpit (could be fixed if the cockpit was on the turret) but then if you put a rotator to elevate the gun (what use is a gun you cant elevate or depress) then if the max is 20 on the stabilizer and on the elevator rotator and if you're going down a hill it could still go up to 40.
    .
    And you cant stop it with blocks because it forces it's way up or down through the build.
    .
    .
    But if you could add elevation controls to the one you said then that might work.

    4.4 years ago
  • Profile image
    66.7k SnoWFLakE0s

    @Minecraftpoweer
    .
    Seems unnecessary to me. You wouldn't need much else than that for a good stabilizer though?

    4.4 years ago
  • Profile image

    @SnoWFLakE0s ye wnp did that for me. And he did one that was a looot more complicated too.

    4.4 years ago
  • Profile image
    66.7k SnoWFLakE0s

    @Dllama4 @Minecraftpoweer

    Completely possible. Pretty easy, actually- if you use my stabilizer mechanism- a rotator with an input of clamp(PitchAngle*0.01, -1, 1), and set zeroOnDeactivate = false, then every requirement here is met.

    +1 4.4 years ago
  • Profile image

    Wnp78 helped me with such a thing, Personally im too stupid to understand how it works and I couldn't tweak it perfectly to how I wanted it. But be did impress me a lot with his skill and knowledge of this stuff.

    4.4 years ago
  • Profile image
    104k Dllama4

    To my knowledge, no such thing is possible.

    4.4 years ago