So I just recently got into funky trees (new commands looked like fun) and I am having trouble making a turret that will lock onto a targeted opponent. Whenever I try it just spins endlessly. Can anybody help me? This is the commands I currently have
Left/right rotator
Min: 0
Max: 360
Input: TargetHeading
Up/down rotator:
Min:0
Max:1
Input: Target elevation
My turrent is just constantly spinning, How do I fix it?
@232287168147825 hey man can you help me with my turret? I wasn't really good at funky tree stuff so yeah can you help me making it auto targeting?
Here's the commands
Rotation
Min:-1
Max:1
Elevation
Min:-0.23
Max:2.05
Old help
thank you for the info
@FishyKrebs and your friend burgdorf making mess with fuhrer and making booze are banned, oh ya, fish are banned too
@MentallyDistorted oh shit , i Can't use Map pointing of doom now
@FishyKrebs kreb, fuhrer eated your map.
@MentallyDistorted i had the same problem like you
@232287168147825 well, now my PBM 1 Mariner is spinning but i already set it to 30*, how to fix it ?
@232287168147825 what if i attach it to a multi turret on a B 17, like front, sides, and rear, is the rotation need to change or no ?
@NumbersNumbersTheMan my mind has opened
Can this be done via mobile?
@NumbersNumbersTheMan thank you.
@NumbersNumbersTheMan doesn't he have to pay you 20$
ok, copying is cool, but learning is cooler
this is a simple one:
heading:
this one will point a 180 degree heading rotator at the target
We subtract our heading because TargetHeading is a global value, not in relation to the craft.
elevation:
this will point a 90 degree elevation rotator at the target
you will get this result. it points at the target.
now let's say you wanted to be a little cooler
you can add some target leading very easily.
The idea is that if we know the rate of angle change using rate(), we can predict the next angular position using the time it will take for the bullet to get there.
https://pastebin.com/jCBzdxRc
.
We add (rate(VALUE) * (TargetDistance / SPEED)) to the old one. You can very easily derive this function to realize it does what I've written above, but in FT.
Take note:
- these are assuming gravityless projectiles (guns).=
- if put in rotators these will only work when you're level.
- the above can be solved by modifying these for gyros, which are global adjusters.
- the examples I've given you, especially the first one, are quite not complicated and should be easy to understand
@Brendorkus thank you!
Yoink @MausTrap1946
@HawaiiRanger I was not able to find anything by searching for turrets. Any help?
Look at the ones that have been made already and copy the code. You could also look at it and see how it works and then type it yourself.
@ImaCat
Oh. That makes sense