Animated flags from 2020 into 2024 wrong direction

My flags turn with the wind as they should in 2020 but they ar 90 degrees of in 2024.

Just found this issue myself.
It’s being caused by ASOBO_WindDirection_Template being different between 2020 and 2024.

My windsock appears 180 degrees out in 2024, but works fine in 2020.

I’ll be using my own code going forward:
(A:AMBIENT WIND DIRECTION, degrees)

I have the same problem with my flags and would like to try your code. Exactly where do I put it to get the right syntax. I´m not a programmer.

Here is an example .xml for my Flag simobject
flag.xml (1.8 KB)

Some requirements of the gltf file to match the xml:
Orientation is an empty with 360 degree rotation animation for the flag (and not the pole)
5 animations pushed down to NLA tracks named knots_00 through to knots_20 to represent the different flag wind animations.
The armature of the flag is named Armature
This also expects 2 LODs, but you can easily remove the LOD1 line

Thanks. Will try it.

Your code did’nt do it all the way. I had to use a model from msfs2020 and got google Ai to chisel out this code that seem to work.

(A:AMBIENT WIND VELOCITY, KNOTS)
	<Component ID="WindSock_Custom_Direction">
        <!-- 
          We use template parameters instead of the explicit <Animation> tag 
          to resolve the "missing attribute 'Type'" error in the debugger.
        -->
		<UseTemplate Name="ASOBO_GT_Anim_Code">
            <ANIM_NAME>orientation</ANIM_NAME>
            <!-- This RPN code corrects your 90-degree offset for ground objects -->
            <ANIM_CODE>(A:AMBIENT WIND DIRECTION, degrees) 90 + -1 *</ANIM_CODE>
            <ANIM_TYPE>Standard</ANIM_TYPE>
            <ANIM_LENGTH>360</ANIM_LENGTH>
            <ANIM_WRAP>1</ANIM_WRAP>
        </UseTemplate>
        
        <!-- We still need to link the component to your specific node -->
        <Node>sourceOrientation_001</Node>

	</Component>
</Behaviors>

All the code isnt visible

Just realised this bug still isn’t fixed in SU4, but I guess as its because its still not showing as “Bug Logged”

Any 2020 sceneries using ASOBO_WindDirection_Template are out by 180 degrees in 2024, even when in compatibility mode.

Any chance of this getting fixed?

I believe it is not a bug. The template changed from 2020 to 2024. This is how I corrected my custom flags and windsocks orientation in 2024:

Component ID="WindSock2020">
           <UseTemplate Name="ASOBO_GT_Anim_Code">
                <ANIM_NAME>Orientation</ANIM_NAME>
                <ANIM_WRAP>1</ANIM_WRAP>
                <ANIM_LENGTH>360</ANIM_LENGTH>
                <ANIM_CODE>(A:AMBIENT WIND DIRECTION,degrees) 180 + dnor</ANIM_CODE>
            </UseTemplate>
        </Component>

I have no problem in changing my code to make 2024 sceneries work.

The issue (and bug) is that 2020 sceneries running in compatibility mode are using the new code template, therefore they are 180 degrees out.

2020 sceneries in 2024 are supposed to work “as is”.

I understand what you mean now. I had not noticed it was affecting the 2020 “compatible” packages.

I think it is indeed a bug, but the category of this post probably needs to be changed by @Biggles1906. There is a 2024 Scenery Bug Report Category that should be used in this case.