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?
@SnoWFLakE0s But no way will u be able to teach them Horizontal Stabilization 😂
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*)
@SnoWFLakE0s what do you mean with (a)....?
@Minecraftpoweer Can the gun elevate the full 20 degrees relative to the tank when going up a hill?
@SnoWFLakE0s not really, I dont really understand this stuff haha
@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)
, wherea
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?@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
@Minecraftpoweer
.
True, and this is indeed limiting in some ways. However regarding this-
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 doclamp(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.
@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.
@Minecraftpoweer
.
Seems unnecessary to me. You wouldn't need much else than that for a good stabilizer though?
@SnoWFLakE0s ye wnp did that for me. And he did one that was a looot more complicated too.
@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.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.
To my knowledge, no such thing is possible.