Profile image

need help with fuse input funky tree

5,426 upperflat  3 months ago

the only code i know is "fuseInput="TargetSelected ? TargetDistance / (1250 - rate(TargetDistance)) : 60"
the problem with this code is it cant change explosion distance from target.
is there orther way to write fuseinput code?

  • Log in to leave a comment
  • Profile image
    12.9k overlord5453

    @upperflat thanks for sharing. I really appreciate it. Like I said change the 915
    With your current velocity and it will work.

    +1 3 months ago
  • Profile image
    12.9k overlord5453

    @upperflat you can change the velocity to wat ever you want. Just make sure you have changed all 915 with your current velocity. And by the way, achieving pinpoint accuracy is impossible unless you're willing to modifi some properties.

    +1 3 months ago
  • Profile image
    5,426 upperflat

    @overlord5453 this is the code that i found,it from user that really like to build german stuff.i cant remember his name.

    TargetSelected?clamp((TargetDistance/(915-rate(TargetDistance)+sin(atan((sin(TargetElevation+rate(TargetElevation)TargetDistance/(915-rate(TargetDistance)))+9.806650.5TargetDistance(1+rate(TargetDistance)/(915-rate(TargetDistance)))/pow(915,2))/cos(TargetElevation+rate(TargetElevation)TargetDistance/(915-rate(TargetDistance))))-((TargetSelected=1)?PitchAngle:0)) -9.80665*(TargetDistance)/(915-rate(TargetDistance)))),0,17.4863):17.4863

    17.4863 is life time.dont forgot to set it in cannon xml

    +2 3 months ago
  • Profile image
    5,426 upperflat

    @overlord5453 all i try is proximity detonation that close enought for small caliber and small explosive.i like to make it more real life,not something that to big.anyway before post this post i found the code that really close to what i imagine.only problem is it cant have velociy more then 915 m/s.but that fine 915 not that slow.after all thank so much for help me

    +1 3 months ago
  • Profile image
    12.9k overlord5453

    @upperflat i tested your code and turns out its more accurate than mine. You just have to increase the caliber or modify it's explosion scalar. I tested it with 150mm canon and twice the explosion scale.

    +1 3 months ago
  • Profile image
    5,426 upperflat

    @overlord5453 yep i know at least i got new knowledge​.

    +1 3 months ago
  • Profile image
    12.9k overlord5453

    @upperflat what was the range you engaged the target at? Remember it's only accurate at closer ranges Or you will have to modify the cannon

    3 months ago
  • Profile image
    5,426 upperflat

    @overlord5453 yep you right it not acculate,you know what i give up i gonna use the original,the original one is explode close to target then the new one.Anyway thank for help me.appreciate to work with you next time.

    3 months ago
  • Profile image
    5,426 upperflat

    @overlord5453 holy it work

    3 months ago
  • Profile image
    12.9k overlord5453

    @upperflat did the fuse went off target or it didn't go of at all?
    Either way, try this
    (TargetDistance / velocity) + (rate(TargetDistance)/velocity) +/- (proxy distance/velocity)
    This is still not pinpoint accurate. Most accurate at closer ranges. Or you could try increasing the caliber of cannon or it's explosionScalar property.

    +1 3 months ago
  • Profile image
    12.9k overlord5453

    @upperflat i will get back after testing. And by the way, it wont be precise.

    3 months ago
  • Profile image
    5,426 upperflat

    @overlord5453 i try with 1050 velocity and 1 meters it not work

    3 months ago
  • Profile image
    5,426 upperflat

    @overlord5453 thank so much

    3 months ago
  • Profile image
    12.9k overlord5453

    So you want to be able to change the distance at which the round explodes?
    The most basic proximity fuse input is TargetDistance / Muzzle velocity. It gives you an output in seconds. The time it will take to reach your target. You can try this TargetSelected? (TargetDistance/(v - rate(TargetDistance) + (proxy/v)):99
    Here, v is velocity of shell and proxy is the distance in meters you want the shell to explode. + to get closer - to get further away from target. For example, TargetSelected?(TargetDistance/(800 - rate(TargetDistance) - (10/800))
    Here the shell will explode 10 meters away from target.
    incase you didn't know, The 1250 in your code is the muzzle velocity. You change it to whatever your cannons velocity in meters/second is.

    +2 3 months ago