Animieren von Steuerflächen bei Flugzeugen

Willkommen in der Transport Fever Community

Welcome to the fan community of Transport Fever and Train Fever, the economic simulators of Urban Games. The community is free for you to share and inform yourself about the game. We cultivate a friendly and objective interaction with each other and our team will be happy to answer any questions you may have.


Registration and use is of course free for you.


We wish you a lot of fun and hope for active participation.

The Team of the Transport-Fever Community

  • [lang=de]Eine kurze Beschreibung der Animation von Steuerflächen im TPF.[/lang] [lang=en]A short introduction to animating control surfaces on aircraft.[/lang]


    A short tutorial on how to animate control surfaces on aircraft.

    0. Build the control surfaces and place their origin somewhere on the desired axis. The exact position on the axis does not matter; I personally like to put the origin on the surfaces end facing the fuselage, but this is only personal preference and not obligatory at all.

    Obviously, primary controls will have their axes lie somewhere close to the front of and intersecting the part. With flaps, things look different: it is often desirable to have them extend a bit backward from the wing while they are moved. To achieve this, place the origin somewhere below the part. A good starting point is 20-50cm lower; try to see if you like the effect and readjust as required.

    1. Turn all the surfaces EXCEPT for the rudder to get their axes lying in parallel to the grand X axis.

    About the X axis you can just turn them to get them to lie flat.

    About the Y axis it depends on the part. Parts situated to the rear of the airfoil generally need to be moved clockwise viewed from top. Slats typically need to be turned counterclockwise. Kruger flaps that move in the opposite direction to normal slats will be turned clockwise obviously.


    Take note of the precise angle You applied to the parts about all relevant axes. A tenth of a degree is typically sufficient in accuracy. A sheet of paper and a pen is recommended.

    "Apply Rot/Scale" to all the surfaces to be animated.

    Export the surfaces to the relevant directories. If done right, the model should look similar to the 707 in the Model Viewer:

    Open your models .mdl file.

    RIght in front of everything else, paste the following two lines:

    1. local vec3 = require "vec3"
    2. local transf = require "transf"

    Look up the lines defining the parts You would like to be animated. They look like this and are usually found in the 2nd third of the file:

    1. {
    2. id = "vehicle/(Type)/(Name)/(Part name).msh",
    3. transf = {1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, x, y, z, 1.0,},
    4. type = "MESH",
    5. },

    Replace the line "transf ={" etc. with the following:

    1. transf = transf.rotZYXTransl(transf.degToRad(Alpha, Beta, Gamma),, y, z, 1.0)),

    The variables will take the following values:
    Alpha, Beta, Gamma: the angles You have noted down for the part previously, obviously with negative value (you need to turn the parts back now), about the Z, Y and X axes.
    x, y, z: the coordinates of the part in the model as taken from line 3 under point 7. Just copy and paste those.

    Save the file and check the Model Viewer to see if the parts are in the right position again.

    If you have adressed those parts properly further down in the .mdl (or via the Blender export plugin), they ought to be animated now.

    Earlier, I have named the rudder as the exception to these guidelines. This surface is not turned in parallel to the X, but in parallel to the Z axis, or the Vertical, if you will. Again, note the angle and apply Rot/Scale. The proper line for the rudder looks as follows in the .mdl:

    1. transf = transf.rotZYXTransl(transf.degToRad(0,-angle,0),, y, z, 1.0)),

    Another note: It may become desirable to apply various animations to one surface. On occasion, an elevator might double up as an aileron (various military types, Tu-144, Concorde), or an aileron might be deflected down together with the flaps. This is possible in the game as well. Just call up the parts multiple times in the .mdl:

    Note how parts 6 to 9 are nominated as left aileron and parts 10 to 13 as right aileron. Then, they are all called up again as elevators in the next block. The game will sum up both deflections and apply the total to the surface at any time. It is also possible to have one part deflect more than another one: just set the deflection angle to the value appropriate for the less moving part and adress the part you want to deflect more strongly twice or thrice. The parts total deflection will be n times the maximum angle, with n being the number of calls. This is useful for high and low speed ailerons for example.