• 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.

Need XML Advice (again)

Messages
149
Hi,
I have run into a number of FS9 models that have an animation I have been unable to get working correctly in P3D (or FSX). This is the animation for things that rotate based on air flowing over them.
The animation works fine on the FS9 model but on the converted model the animation will rotate part way and then jerk back to keyframe 0

The following are a couple of examples of the code that MCX is generating for the animation when I import the FS9 model. Can anyone help me get the animation rotating correctly?

XML:
<Code>(A:Airspeed select indicated or true,knots) 26 min     2 /     (L:LastAnemRotation, degrees) +     360 %     d     (&gt;L:LastAnemRotation, degrees)     dgrd</Code>

XML:
<Code>(A:Airspeed select indicated or true,knots) 10 min     0.2 /     (L:LastAnemRotation, degrees) +     360 %     d     (&gt;L:LastAnemRotation, degrees)     dgrd</Code>

Thanks
Gavin
 
Messages
95
Country
japan
I have one question.

Does that FS9 version's animation rotate by key 0- 360 at once ?
I mean the rotation settings are at 0 ..0 degrees 360 ... 360degrees and nothing else ?

If doing at source of GMax level .. FSX animation can't rotate more then 90 degrees at once.
If more then that , won't animate correct.
So can't be sure if it's XML's problem or not.

For checking , just make a simple guage which sets (L:LastAnemRotation, degrees) and test

So has to split in atleast 4 keys
0-90 .. 90 degrees
90-180 .... 90 degrees
180-270 .... 90 degrees
270-360 .... 90 degrees
If me will set at each 10 degrees.
 
Messages
149
Hi,
thanks for the suggestion.
In MCX the animation has 5 keyframes
0 - 0, 0, 0, 1
25 - 0, 0, 0.707,0.707
50 - 0, 0, 1, 0
75 - 0, 0, 0.707, -0.707
100 - 0, 0, 0, -1

So it looks to me like it is splitting into 4 90 degree rotations.

I have tried setting the animation to anemometer with no success. The animation just freezes.

Gavin
 
Messages
149
Hi,
I extracted the part and re-animated it in FSDS (ancient I know but I can work with it).
I gave it 5 keyframes at 0, 90, 180, 270 and 360 degree rotations and named the animation anemometer. I then compiled the part and attached it back to the model. Thats when I discovered that although I have an <Animation name="anemometer .....> line in my modeldef.xml there is no associated XML code :banghead:.

Can anyone share this code with me?

thanks
Gavin
 

tgibson

Resource contributor
Messages
11,338
Country
us-california
Neither of my FSX or P3D modeldef files include any code sections, just headers.
 
Messages
149
Thanks Tom
I figured it out (finally had the sense to look at some FSX native aircraft with similar animations).
Using the XML editor in MCX and replacing the final dgrd (the one just before </Code> ) with
XML:
360 / 100 *
restores the animation.

Gavin
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Using the XML editor in MCX and replacing the final dgrd (the one just before </Code> ) with
XML:
360 / 100 *
restores the animation.
Yes, dividing the 360 degrees of rotation by 100 (frames) neatly scales the animation properly... :wizard:
 
Top