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?
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?
@An2k thanksss
@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<<<
@An2k how to change the speed for pitch also?
@An2k is it possible to add smooth function on sum(Roll*0.5)??
Truly amazing, thank you very much to all of you, now my turrets won't be limited to 180 anymore!
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)
orsum(Trim*0.5)
below just release input to stop
sum(Yaw*0.5)
sum(Roll*0.5)
for turret elevation/depression up-down
credit
@Leehopard
code structure just change value of -1 how low and 1.5 how highsmooth(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 fixselectedweapon
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
@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.
@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
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
oh boy!
@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.
@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
@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
@vcharng hey it works! Thanks!!
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@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.
@scratch it doesnt seem to take the min/max values of the rotators... this makes it great for Roll tho
@Rub3n213 yes it's like a dream come true!
@scratch thanks will try now
Ooo this is possible now?
sum(Pitch)
andsum(Roll)