Hi all,
I've been attempting to fix a screwy autobrake knob animation on an aircraft. I used the MCX tool to extract the .xanim and .x files and then spent weeks re-learning basic trigonometry and quarternion math to get the animation right. It works beautifully now.
When compiled and reviewed in MCX, the animation works as expected. The Object Hierarchy screen indicates that the mouse rectangle is active and assigned the correct name. Same goes for the animation.
When I use the VC in FSX, the mouse rectangle appears ok. That is, when I hover my mouse over the knob, a hand cursor appears. However, rolling the mouse wheel, clicking the mouse etc has no effect. Nothing occurs.
When I use the 2D panel and rotate the 2D autobrake knob, the VC knob rotates as expected. So there is no problem with the animation.
I can only figure that there is a problem with the mouse rectangle triggering the key event, but I can't figure it out. See the code below. I'd really appreciate any advice on this.
Thanks everyone!
Trent
From the .xanim file:
From the Modeldef.xml file:
I've been attempting to fix a screwy autobrake knob animation on an aircraft. I used the MCX tool to extract the .xanim and .x files and then spent weeks re-learning basic trigonometry and quarternion math to get the animation right. It works beautifully now.
When compiled and reviewed in MCX, the animation works as expected. The Object Hierarchy screen indicates that the mouse rectangle is active and assigned the correct name. Same goes for the animation.
When I use the VC in FSX, the mouse rectangle appears ok. That is, when I hover my mouse over the knob, a hand cursor appears. However, rolling the mouse wheel, clicking the mouse etc has no effect. Nothing occurs.
When I use the 2D panel and rotate the 2D autobrake knob, the VC knob rotates as expected. So there is no problem with the animation.
I can only figure that there is a problem with the mouse rectangle triggering the key event, but I can't figure it out. See the code below. I'd really appreciate any advice on this.
Thanks everyone!
Trent
From the .xanim file:
Code:
<Anim name="switch_auto_brake" guid="385d4d52-3ab8-40bb-b408-a56a54c13cc1" length="100.000" type="Sim" typeParam="AutoPlay" typeParam2="switch_auto_brake">
<AnimStream name="Rotation" id="0" partName="node70" length="50.000">
<Keyframe time="0.000" type="Quaternion" data="0.000000;0.000000;0.000000;1.000000"/>
<Keyframe time="10.000" type="Quaternion" data="0;-0.366544;-0.109963;0.92388"/>
<Keyframe time="20.000" type="Quaternion" data="0;-0.677285;-0.203186;0.707107"/>
<Keyframe time="30.000" type="Quaternion" data="0;-0.884916;-0.265475;0.382683"/>
<Keyframe time="40.000" type="Quaternion" data="0;-0.957826;-0.287348;0"/>
<Keyframe time="50.000" type="Quaternion" data="0;-0.884916;-0.265475;-0.382683"/>
</AnimStream>
</Anim>
From the Modeldef.xml file:
Code:
<Animation name="switch_auto_brake" guid="385d4d52-3ab8-40bb-b408-a56a54c13cc1" length="100" type="Sim" typeParam2="switch_auto_brake" typeParam="AutoPlay" />
<PartInfo>
<Name>switch_auto_brake</Name>
<MouseRect>
<Cursor>Hand</Cursor>
<HelpID>HELPID_GAUGE_AUTOBRAKE_SWITCH</HelpID>
<TooltipID>TOOLTIPTEXT_AUTOBRAKE_SWITCH</TooltipID>
<MouseFlags>LeftSingle+LeftDrag+Wheel</MouseFlags>
<CallbackJumpDragging>
<XMovement>
<Delta>10</Delta>
<EventIdInc>INCREASE_AUTOBRAKE_CONTROL</EventIdInc>
<EventIdDec>DECREASE_AUTOBRAKE_CONTROL</EventIdDec>
</XMovement>
</CallbackJumpDragging>
</MouseRect>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Sim>
<Variable>AUTO BRAKE SWITCH CB</Variable>
<Units>enum</Units>
<Scale>10</Scale>
<Bias>0</Bias>
</Sim>
<Lag>400</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>


