• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

SDK Problem Windsock with wind direction, please ....

Messages
300
Thanks Mamu
If I understand correctly, the animation must go clockwise for a lengh of 360°, so, from 0 to -359 ?
 
Messages
767
Country
italy
Thanks Mamu
If I understand correctly, the animation must go clockwise for a lengh of 360°, so, from 0 to -359 ?
Yep,
Also take a look at the axis , using the PartInfo method the x+ Is facing Wind direction (where the Wind comes from, so when wind Is from 270 the x+ Will align to 270)

While using Asobo template the x+ Will face 270 with the Wind from 90

When doing your animation, Just Imagine where the Wind comes from, at 0 frame should be from North position, at 90 frame should be at East position, and adjust your mesh accordingly

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Messages
300
Hi Mamu

I checked my orientation animation and frames. They didn't really match. I corrected them by inserting rotation keyframes at 0,° 90°, 270°, 180°
Now, the windsocks work fine

Thanks for your advises
 
Messages
13
Country
denmark
Sorry to bump, but I have a little issue.
I made a simple windsock on a pole after @mamu 's tutorial (thanks :))
My project compiles in fspackagetool and all animations work correctly in 3D Viewer.
I can also load my model as a SimObject in sim.

My question:
with depreciated code:

<Animation guid="950397a4-6717-41a4-a6b0-e531ed244691" type="Sim" name="Orientation" typeParam2="Orientation" typeParam="AutoPlay" length="360"/>
- <PartInfo>
<Name>Orientation</Name>
<AnimLength>360</AnimLength>
- <Animation>
- <Parameter>
<Code>(A:AMBIENT WIND DIRECTION, Degrees)</Code>
</Parameter>
</Animation>

everything works fine, but with current SDK:

<Behaviors>
<Include ModelBehaviourFile="Asobo\Misc\SimObjects.xml"/>
<Component ID="Orientation">
<UseTemplate Name="ASOBO_WindDirection_Template">
</UseTemplate>
</Component>
</Behaviors>

only the wind strength animations work and the orientation ignores the ambient wind.

It must be something simple. Can anyone help?

Edit: Its a Steam installation, I wonder if my xml cant find the ModelBehaviourDefs for the template 🤔
 
Last edited:
Messages
767
Country
italy
Sorry to bump, but I have a little issue.
I made a simple windsock on a pole after @mamu 's tutorial (thanks :))
My project compiles in fspackagetool and all animations work correctly in 3D Viewer.
I can also load my model as a SimObject in sim.

My question:
with depreciated code:


-
Orientation
360
-
-
(A:AMBIENT WIND DIRECTION, Degrees)



everything works fine, but with current SDK:









only the wind strength animations work and the orientation ignores the ambient wind.

It must be something simple. Can anyone help?

Edit: Its a Steam installation, I wonder if my xml cant find the ModelBehaviourDefs for the template
Make sure that your sock is attached to an empty with the name "Orientation" and the animations strip in the NLA is Orientation too, that is all is needed to make the orientation work

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
 
Messages
13
Country
denmark
Make sure that your sock is attached to an empty with the name "Orientation" and the animations strip in the NLA is Orientation too, that is all is needed to make the orientation work

Inviato dal mio Mi 9 Lite utilizzando Tapatalk
Thanks for the reply.
I am sure the model is built correctly, including naming the empty and the animations in NLA.
Otherwise it wouldn't work with the legacy code with those same parameters.
Its either not finding the template or maybe Behaviours are broken in SU10. Probably an error in XML, but if so I haven't found it yet.

I also tried a very simple model with just a box on an axis and that doesn't rotate with wind direction either with the latest code standard.

For info, I am using Blender 2.9 with the toolkit. I tried 3.2 with Asobo's exporter, but that exported 9 animations where I only have 7 defined.
 
Messages
767
Country
italy
Make sure that the Behaviors section is in the right place in your model.xml
The template is really easy
Basically is only looking for an animation with the name "Orientation", it doesn't even care about the name of the object!


XML:
<Template Name="ASOBO_WindDirection_Template">
    <DefaultTemplateParameters>
        <ANIM_NAME>Orientation</ANIM_NAME>
    </DefaultTemplateParameters>
    <UseTemplate Name="ASOBO_GT_Anim_Code">
        <ANIM_CODE>(A:AMBIENT WIND DIRECTION,degrees) 180 + dnor</ANIM_CODE>
        <ANIM_WRAP>1</ANIM_WRAP>
        <ANIM_LENGTH>360</ANIM_LENGTH>
    </UseTemplate>
</Template>

Ok now the solution for you:

XML:
<Include ModelBehaviourFile="Asobo\Misc\SimObjects.xml"/>

There is a "spelling error" here, is not ModelBehaviourFile but ModelBehaviorFile

XML:
<Include ModelBehaviorFile="Asobo\Misc\SimObjects.xml"/>
 
Messages
13
Country
denmark
Yes. :)
In my defence, I did write "Probably an error in XML, but if so I haven't found it yet."
Seems Asobo are using American instead of English, as they are working with Microsoft.

Mille grazie! @mamu
 
Top