Profile image

funky trees request - for turrets

8,632 BeryllCorp  4.6 years ago

Is it posible for FT to make Pitch and Roll to rotate the turret without it going back to zero when the button is released? What code should i use?

  • Log in to leave a comment
  • Profile image

    @An2k thanksss

    2.2 years ago
  • Profile image
    1,212 An2k

    @CaptFoxworth19 wow sorry for the late reply been on a hiatus
    On both questions yep saw some but sorry im rusty to FT codes surely theres more better samples espescially on new updates

    Btw I have here forgotten project u can play around with its shit but kinda okey tell me ur input on it >>>LinkOldTurretTest<<<

    +1 2.3 years ago
  • Profile image

    @An2k how to change the speed for pitch also?

    2.3 years ago
  • Profile image

    @An2k is it possible to add smooth function on sum(Roll*0.5)??

    2.3 years ago
  • Profile image
    15.8k Wernster

    Truly amazing, thank you very much to all of you, now my turrets won't be limited to 180 anymore!

    +1 3.6 years ago
  • Profile image
    1,212 An2k

    seen some still uses basic inputs on turrets maybe they can see this thread and slap this on

    for 360° turret traverse turning

    require for you to bring slider back to neutral to stop turning..not sure 0.5 is for but works.. [modification to the sum() code u guys provided below]
    sum(VTOL*0.5) or sum(Trim*0.5)
    below just release input to stop
    sum(Yaw*0.5)
    sum(Roll*0.5)

    for turret elevation/depression up-down

    credit @Leehopardcode structure just change value of -1 how low and 1.5 how high

    smooth(clamp(99999*Trim,-1,1.5),abs(pow(Trim,3)))
    or
    smooth(clamp(99999*VTOL,-1,1.5),abs(pow(VTOL,3)))
    or
    smooth(clamp(99999*Pitch,-1,1.5),abs(pow(Pitch,3)))

    for turret stabilization via rotator, most ive seen have long codes ..mindblown..myself can barely understand codes above..seems smooth & clamp are useful.wished I understand more.
    @BeryllCorp yeah but i think some may find a way to counter zeroOnDeactivate rotator memory via FT maybe on its ActivateGroup and hoping the DEVs fix selectedweapon on android and this. will save us effort putting up winches and magnets on turrets.

    Edit: how do yoummake text BLUE lol???nvnmd foundout.. u just put ##text## it must have its own line so after the last# press enter like this

    test

    +3 4.6 years ago
  • Profile image
    8,632 BeryllCorp

    @An2k for elevation i use clamp(sum(Pitch), -1, 1). It has the same issue of remembering its previous position but i can live with that in my current project.

    Maybe this is a flaw in the FT system or we are not intelligent enough work around this problem, yet.

    4.6 years ago
  • Profile image
    1,212 An2k

    @Reuben201103 so.. Activate1=1 ? sum(Roll) : 0..nice never thought of using IF Else statement ..anyways the same annoying rotator having a memory of last position like having zeroOnDeactivate = true on setting
    |||||||||||||||||||||||||||||
    On all... what do you guys have for elevation using funky tree codes, like FT codes to elevate turret using PITCH/TRIM&VTOL

    On project using ..sum(Trim+sum(0)) nice on small increments ..but requires you to drag it back to neutral to stop it.. failing to do so it keeps rotating...code does better when used in pitch thu like sum(Pitch+sum(0)) but also can over travel if u hold pitch and bummer for those who use pitch as throttle..wondering what you guys used

    4.6 years ago
  • Profile image
    15.4k Reuben201103

    Use the sum function. E.g:

    sum(Roll)

    And if you wanted it to return to 0 when, say AG 1 was deactivated it would be :

    Activate 1 ? sum(Roll) : 0

    4.6 years ago
  • Profile image

    oh boy!

    4.6 years ago
  • Profile image
    8,632 BeryllCorp

    @An2k on gyro controlled turret, you can hide a winch at the back of the turret that can pull it back to neutral position.

    Or, use a magnet that will lock your turret in place when activated.

    4.6 years ago
  • Profile image
    1,212 An2k

    @BeryllCorp yep perfect for my needs on rotator if only rotator stop having memory of its last position. Like on gyro controlled turret locking it while moving is an issue plus can nt use zero on deactivate but not rotators..if only i know how to stop that im on my way to finally submit creation

    4.6 years ago
  • Profile image
    8,632 BeryllCorp

    @An2k zeroOnDeactivate works with funky trees as long as the part is assigned to an activation group..

    tho when the part is activated again it will come back to its previous position

    4.6 years ago
  • Profile image
    8,632 BeryllCorp

    @vcharng hey it works! Thanks!!

    4.6 years ago
  • Profile image
    1,212 An2k

    On turret topic...anyone have used these 360 rotator code with adding zeroOnDeactivate = True on its input setting with xml?...like pressing an AG to return rotator to its neutral 0 traverse position. Unlike gyro controlled turret which cant do these with AG but theres an issue...pressing AG it does return to neutral but reactivating AG again causes turret to automatically``return to its`` last position ....Any funky trick code or method to make rotator not do that? Like deactivate AG turret neutral then Reactive AG the rotator stays put in place until use

    4.6 years ago
  • Profile image
    9,445 vcharng

    @BeryllCorp Use clamp.
    clamp01(sum(Pitch)) etc.... Unfortunately if you constantly input in one direction you will need a while to get it back into the 0 to 1 range.

    +3 4.6 years ago
  • Profile image
    8,632 BeryllCorp

    @scratch it doesnt seem to take the min/max values of the rotators... this makes it great for Roll tho

    +1 4.6 years ago
  • Profile image
    23.1k Scratchoza

    @Rub3n213 yes it's like a dream come true!

    4.6 years ago
  • Profile image
    8,632 BeryllCorp

    @scratch thanks will try now

    4.6 years ago
  • Profile image
    10.9k Rub3n213

    Ooo this is possible now?

    4.6 years ago
  • Profile image
    23.1k Scratchoza

    sum(Pitch) and sum(Roll)

    +1 4.6 years ago