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

P3D v4 Track Indicator Help

Messages
45
I am trying to model the track indicator in the Tutor jet using the code that a friend did for me when we worked on an older FSX version. His code works great in the 2D cockpit but I am having a hard time getting it to work in P3D with the same movement. I tried a bunch of different animation key frames with all the same results. Everything seems fine when the little airplane pointer starts at the top and moves to the right. As it rotates, it mimics what the 2D one is doing until about 350 degrees. The 2D will keep moving and the 3D one stops...then when the 2D hits top again (360 or 0...), the 3D one jumps to 0 as well.

I tried using degree within the model and key frames of 360, pretty much the same result. Then I did key frame of 7 as 360 is about 6.28 radians. So at 1 radian, I move the little airplane dude 57.3 degrees...up to the 7 of 401.07 degrees. But it seems to jump from 6 to 0 with no small movements like the rest. I tried to multiple the value by 10 and increase my key frame to 70 hoping 60.0 - 62.8 would be mapped. Nope, still seems to stop at 6 and then jumps to 0.

// From 2D panel code...
<Element>
<Position X="0" Y="0"/>
<MaskImage Name="TRI_mask.bmp">
<Axis X="156" Y="148"/>
</MaskImage>
<Image Name="TRI_needle.bmp" Luminous="1">
<Axis X="29" Y="72"/>
</Image>
<Rotate>
<Value>(A:Plane heading degrees gyro,radians) (A:NAV1 OBS,radians) -</Value>
<Failures>
<GAUGE_GYRO_HEADING Action="Freeze"/>
<SYSTEM_ELECTRICAL_PANELS Action="0"/>
<SYSTEM_ELECTRICAL_AVIONICS Action="0"/>
<GAUGE_VOR Action="Freeze"/>
</Failures>
</Rotate>
</Element>

// From modeldef.xml code...
<PartInfo>
<Name>needle_tri</Name>
<AnimLength>70</AnimLength>
<Animation>
<Parameter>
<Code>
(A:Plane heading degrees gyro,radians) (A:NAV1 OBS,radians) - 10 *
</Code>
</Parameter>
</Animation>
</PartInfo>
 
Please use code tags when posting code ;)
Image2.jpg


This should work for you, use 360 keyframes.
If it doesn't work then it is your animation key assignments.

XML:
<PartInfo>
    <Name>needle_tri</Name>
    <AnimLength>360</AnimLength>
        <Animation>
            <Parameter>
                <Code>
                    (A:plane heading degrees gyro,radians) (A:NAV1 OBS,radians) - rddg dnor
                </Code>
            </Parameter>
        </Animation>
</PartInfo>

Roman
 
Yes, on both. I like for the code tags when I was posting and couldn't find it. Guess I was too focused on the xml issue.

That worked, the rddg dnor. Thanks for the help.
 
Back
Top