Profile image

How to make an engine activate gradually at altitude?

16.1k CrazyEngine  7 months 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
    5,449 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 7 months ago
  • Profile image
    5,449 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%)

    2 months ago
  • Profile image
    120 W22w1010

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

    2 months ago
  • Profile image
    100.0k GuyFolk

    @Zaineman
    Guess I'm late lol.

    7 months ago
  • Profile image
    5,449 Timplanes

    @CrazyEngine No worries, glad I was able to help

    7 months ago
  • Profile image
    16.1k 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

    7 months ago
  • Profile image
    173k 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 🤧

    7 months ago
  • Profile image
    22.6k Graingy

    I see you seek comfort in the divine?

    7 months ago
  • Profile image
    16.1k CrazyEngine

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

    7 months ago