Profile image

Coding for a rotator

6,831 Skykid028  1.6 years ago

Hey y'all, need alittle help. How do you make a rotator decrease its max rotation as the speed increases? I'm working on a build that needs the rotator to have a high rotation when it's slow but very little as it goes faster. I'll be sure to give you credit when the build is complete.

  • Log in to leave a comment
  • Profile image
    49.5k PlaneFlightX

    Pitch * (clamp(1 - (IAS / 500), 0.1, 1))
    Does this work?

    Pinned 1.6 years ago
  • Profile image
    6,831 Skykid028

    @PlaneFlightX I'll for sure use that

    1.6 years ago
  • Profile image
    49.5k PlaneFlightX

    @Skykid028 That's alright. To simplify that code, you could do clamp(Pitch + Roll, -1, 1) * clamp(1 - (IAS / 500), 0.1, 1).

    +1 1.6 years ago
  • Profile image
    6,831 Skykid028

    @PlaneFlightX I made a small tweak to your code so the elevator will also act like an aileron. Thank you again.

    Pitch * (clamp(1 - (IAS / 500), 0.1, 1)) + Roll * (clamp(1 - (IAS / 500), 0.1, 1))

    1.6 years ago
  • Profile image
    30.0k 32

    This is some very good code. I'm gonna steal that for my current project if you don't mind @PlaneFlightX

    1.6 years ago
  • Profile image
    6,831 Skykid028

    @PlaneFlightX your code is working, thank you. Credit for you when I finish this

    +1 1.6 years ago
  • Profile image
    6,831 Skykid028

    @PlaneFlightX thank you and @PlaneFlightX I'll give it a go. Thank you

    +1 1.6 years ago
  • Profile image
    49.5k PlaneFlightX

    @Skykid028 Alright, I got an idea of what I need to do then, when I get some time to experiment in SP I'll send the code.

    1.6 years ago
  • Profile image
    6,831 Skykid028

    @PlaneFlightX alittle over 1100mph in full afterburner

    1.6 years ago
  • Profile image
    49.5k PlaneFlightX

    @Skykid028 What is the top speed of the fighter jet in level flight?

    1.6 years ago
  • Profile image
    6,831 Skykid028

    @PlaneFlightX it's for an elevator on a fighter jet, do you know how as a fighter jet goes faster the elevator needs to move less and less? That's what I'm trying to make

    1.6 years ago
  • Profile image
    49.5k PlaneFlightX

    I'll need some parameters. What speed do you want it to reach minimum rotation? How much rotation? What input does the rotator have?

    1.6 years ago