Profile image

differential braking help

2,191 52REX  8 months ago

Hello everyone, I am working on a taildragger that has a skid instead of a wheel in the back
Can anyone skilled enough with funky trees provide me with the instructions to implement differential braking ?
You will be credited when the plane gets posted.

  • Log in to leave a comment
  • Profile image
    37.8k Tingly06822

    @Ku yo I needed this too lol thx

    +1 8 months ago
  • Profile image
    2,191 52REX

    @Ku thank you, I will try this

    +1 8 months ago
  • Profile image
    17.3k Ku

    Sure
    first you need to go into the variables menu of your wheels and set a variable name for the RPM. I'm gonna use LRPM and RRPM to reference the left and right wheel RPM respectivley
    Your code for the left engine is gonna look something like this
    abs(clamp(Yaw,-1,0))*PID(LRPM,0,1,0,0)
    and right engine
    abs(clamp(Yaw,0,1))*PID(RRPM,0,1,0,0)

    make sure that the engine is turning the wheel the right way and mess with the thrid term in the PID function to either make the braking stronger or shake the wheel less

    +1 8 months ago
  • Profile image
    2,191 52REX

    @Ku thank you, could you please write funky trees code for the two engines?

    8 months ago
  • Profile image
    17.3k Ku

    The wheels in this game work very weirdly in that if you use Brake, it will brake every wheel on the plane no matter what and you can't change that. What I'd do is install two car engines and connect a wheel to each one. Then you are going to make a funky trees code for each engine to activate and stop the wheel's RPM on command. For example, if I'm yawing left, the code would activate the left wheel/engine and the engine would trying and make the RPM of the left wheel 0, thus achieving braking.

    I've found that this is very useful in making parking brakes as well

    8 months ago