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
lane 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
lane heading degrees gyro,radians) (A:NAV1 OBS,radians) - 10 *
</Code>
</Parameter>
</Animation>
</PartInfo>
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
<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
</Code>
</Parameter>
</Animation>
</PartInfo>
