Profile image

I want an automatic aiming cannon :)

19.6k MsMuseumJanitor  1.1 years ago

I'd like to know how to make an Auto Aim 'cannon' not gun, I found it difficult.

Cannon projectile speed, 650m/s or 2133ft/s

  • Log in to leave a comment
  • Profile image

    @MsMuseumJanitor yes. The speed of the projectile in m/s.

    +1 1.1 years ago
  • Profile image

    @overlord5453 also is velocity the speed of the cannon or something else

    1.1 years ago
  • Profile image

    @overlord5453 wow!!! Thanks man I'm gonna use this for a build

    +1 1.1 years ago
  • Profile image

    @MsMuseumJanitor
    For elevation
    TargetSelected?(atan(((pow(V,2)) - (sqrt((pow(V,4)) - (9.81 * ((9.81 * pow((cos(TargetElevation) * TargetDistance), 2)) + ((2 * ((sin(TargetElevation) * TargetDistance))) * pow(V,2)))))))/(9.81 * (cos(TargetElevation) * TargetDistance))) + rate(TargetElevation) * (TargetDistance / V)) / 90:0


    For traverse
    (((TargetHeading - Heading) + (rate(TargetHeading) * ((TargetDistance) / V)))/ 180) * clamp01(TargetDistance < 20000) * clamp01(TargetSelected)


    V - Velocity in meters per second
    If any of the rotator is facing the opposite direction, simply invert that rotator.
    It's not pin point accurate. Most effective against slow moving targets. Struggles against fast moving maneuvering targets.

    It must be on a level surface. Can be put on ships as long as they are upright. Works with both guns and cannons.
    +1 1.1 years ago
  • Profile image

    @overlord5453 sure I'll just say the code was from you then

    1.1 years ago
  • Profile image

    @MsMuseumJanitor i will give you a code. It's not mine (don't remember where I took them from) but it will work.

    +1 1.1 years ago
  • Profile image

    @overlord5453, can you help me..?

    1.1 years ago