Profile image

How to make an engine activate gradually at altitude?

16.8k CrazyEngine  1.3 years ago

I'm trying to make an engine that is realistic, that increases power according to altitude, but I don't know how to put several functions at the same time, something like (Altitude1000,Throttle0.5)+(Altitude2000,Throttle0.75)

  • Log in to leave a comment
  • Profile image
    10.6k Timplanes

    You could use an expression like this:
    Throttle * (clamp((Altitude / 5000), 0, 0.5) + 0.5)
    It should start at 50% maximum power at sea level and increase until it hits 100% at 5000m.
    Also you can check out the engines on this plane if you would like. I did something similar on the engines there.

    Edit: upon looking at this again, the code actually makes the power reach 100% at 2500m. If you want a certain altitude just multiply it by 2

    Pinned 1.3 years ago
  • Profile image
    10.6k Timplanes

    @W22w1010 hmm… try use the code above but put a negative in front of the clamp (so it decreases) and a +1 at the end instead of +0.5 (so it starts at 100%)

    10 months ago
  • Profile image
    135 W22w1010

    @Timplanes how do you make it decrease gradually with altitude?

    10 months ago
  • Profile image
    106k GuyFolk

    @Zaineman
    Guess I'm late lol.

    1.3 years ago
  • Profile image
    10.6k Timplanes

    @CrazyEngine No worries, glad I was able to help

    1.3 years ago
  • Profile image
    16.8k CrazyEngine

    @Timplanes Dude, this was exactly the code I needed, thanks so much for giving me this, I'll mention you on my next plane

    1.3 years ago
  • Profile image
    192k Zaineman

    @CrazyEngine I appreciate the kind words. As far as engine speed vrs altitude, look at my gear warning light. It has speed components in the programming w altitude parameters as well. @Guyfolk helped me with the programming. He is a true expert. I just cut paste, experiment, reverse engineer and test. Z 🤧

    1.3 years ago
  • Profile image
    37.1k Graingy

    I see you seek comfort in the divine?

    1.3 years ago
  • Profile image
    16.8k CrazyEngine

    @Zaineman you are the first thing that comes to mind when talking about funky tree

    1.3 years ago