Profile image

How to make a gun arc on an autoaim-rotators?

90.4k winterro  3.0 years ago

i am making a turretless tank destroyer, but i do not know how to make it behave like it does not have a turret without making it explode or stuff.

alt text

  • Log in to leave a comment
  • Profile image
    23.0k Scratchoza

    (edit: oh ok this probably isnt for what you meant sorry) Idk if you've already solved it but I think
    smooth(Roll=0?0:sign(Roll),abs(Roll)*X)
    for the side to side canon rotation (its like a clamped sum function but better)

    and
    (smooth(Roll=0?0:sign(Roll),abs(Roll)*X) = 1) ? Roll : ((smooth(Roll=0?0:sign(Roll),abs(Roll)*X) = -1) ? Roll : 0)
    for steering the whole tank when it reaches the maximum angle.

    X is the speed multiplier, use the same input or number

    2.9 years ago
  • Profile image
    9,334 Tookan

    but in this case
    smooth(clamp(99999*Yaw,-1,1),abs(pow(Yaw,2)))
    and make sure your rotator is a normal rotator with a input of Yaw, not a hinge rotator, and see that the rotator is set to 25 degrees as your pic shows there

    2.9 years ago
  • Profile image
    9,334 Tookan

    @winterro
    smooth(clamp(99999*Yaw,-0.3,0.7),abs(pow(Yaw,2)))
    this is one I'm using for a ISU-152

    2.9 years ago
  • Profile image
    9,334 Tookan

    @winterro
    yeah, I'll check again, just remember mine isn't an auto-aim one

    2.9 years ago
  • Profile image
    90.4k winterro

    @THEYE @iniMiiW i tried the codes, but none seem to work? maybe something was spelled wrong?

    2.9 years ago
  • Profile image

    Hmmm maybe these
    ((cos(TargetElevation) * TargetDistance)/(cos((atan(((pow(2000,2)) - (sqrt((pow(2000,4)) - (9.81 * ((9.81 * pow((cos(TargetElevation) * TargetDistance), 2)) + ((2 * ((sin(TargetElevation) * TargetDistance))) * pow(2000,2)))))))/(9.81 * (cos(TargetElevation) * TargetDistance))) + rate(TargetElevation) * (TargetDistance / 2000)) / 1) * 2000))
    Or these
    sum(0.5clamp01(Roll))+(-(sum(0.5clamp01(-Roll))))

    3.0 years ago
  • Profile image
    9,334 Tookan

    It also works for elevation, but just remember to adjust it a bit to fit your needs

    3.0 years ago
  • Profile image
    9,334 Tookan

    smooth(clamp(99999*Yaw,1,1),abs(pow(Yaw,3)))
    That's if you want to use Yaw for turret traverse on a tank destroyer but no auto-aim

    3.0 years ago
  • Profile image
    9,334 Tookan

    Oh, wait, auto-aim, nah fam, I don't know auto aim but I could give you something else

    3.0 years ago
  • Profile image
    9,305 Yoshimi

    clamp it lol

    3.0 years ago
  • Profile image
    9,334 Tookan

    I'll give you a code later when I'm at my computer, sit tight for now :)

    3.0 years ago