- Messages
- 358
- Country
Hi folks, I'm back to modelling again after taking a hiatus for several months over the summer.
As usual in cases like this it seems I've forgotten more than I've remembered and I'm stumped on a conditional animation and could do with some help (XML coding was never my strong point!)
Here's the scenario, my current model has an opening glove box close to the co-pilot's yoke and I have 'interference' between the yoke and the glove box door/lid (i.e. at various points in the animation one part passes through the other part). What I would like to do is set up a conditional animation on the glove box door/lid so that you cannot operate it unless you have hidden the co-pilot yoke first. The door operates fine on it's own as does the yoke and the yoke visibility but when I try to make the suggested conditional animation the yoke still hides but the door/lid only opens roughly 1/4" (6mm) before it stops.
Here are the working code blocks that I've been using:
Glove Box
Yoke Animation/Visibility
My first attempt at the conditional code was based on altering the 'code' section of the glove box code like this:
My second attempt was based on the condition in the glove box 'mouse rectangle' section like this:
Neither of the above attempts worked so I'm sitting scratching my head at the moment and wondering why it doesn't work.
Anyone have any ideas on what I need to do to achieve my goal?
As usual in cases like this it seems I've forgotten more than I've remembered and I'm stumped on a conditional animation and could do with some help (XML coding was never my strong point!)
Here's the scenario, my current model has an opening glove box close to the co-pilot's yoke and I have 'interference' between the yoke and the glove box door/lid (i.e. at various points in the animation one part passes through the other part). What I would like to do is set up a conditional animation on the glove box door/lid so that you cannot operate it unless you have hidden the co-pilot yoke first. The door operates fine on it's own as does the yoke and the yoke visibility but when I try to make the suggested conditional animation the yoke still hides but the door/lid only opens roughly 1/4" (6mm) before it stops.
Here are the working code blocks that I've been using:
Glove Box
Code:
<PartInfo>
<Name>NavA_glove_box_door</Name>
<AnimLength>50</AnimLength>
<Animation>
<Parameter>
<Code>
(L:glove_box_door, bool) 50 *
</Code>
<Lag>100</Lag>
</Parameter>
</Animation>
<MouseRect>
<MouseFlags>LeftSingle</MouseFlags>
<Cursor>Hand</Cursor>
<CallbackCode>
(L:glove_box_door, bool) ! (>L:glove_box_door, bool)
</CallbackCode>
<TooltipText>Glove Box Door</TooltipText>
</MouseRect>
</PartInfo>
Yoke Animation/Visibility
Code:
<PartInfo>
<Name>Navion_hide_copilots_yoke</Name>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Hide Copilot's Yoke</TooltipText>
<CallbackCode>
(L:Navion_YokeCoPilot,bool) ! (>L:Navion_YokeCoPilot,bool)
</CallbackCode>
</MouseRect>
</PartInfo>
<PartInfo>
<Name>Navion_yoke_copilot</Name>
<Visibility>
<Parameter>
<Code>(L:Navion_YokeCoPilot,bool) 0 > if{ 0 } els{ 1 }</Code>
</Parameter>
</Visibility>
</PartInfo>
My first attempt at the conditional code was based on altering the 'code' section of the glove box code like this:
Code:
<Code>
(L:glove_box_door, bool) 50 *
(L:Navion_YokeCoPilot,bool) ! (>L:Navion_YokeCoPilot,bool)
and
</Code>
My second attempt was based on the condition in the glove box 'mouse rectangle' section like this:
Code:
<MouseRect>
<MouseFlags>LeftSingle</MouseFlags>
<Cursor>Hand</Cursor>
<CallbackCode>
(L:glove_box_door, bool) ! (>L:glove_box_door, bool)
(L:Navion_YokeCoPilot,bool) 0 > if{ 0 } els{ 1 }
and
</CallbackCode>
<TooltipText>Glove Box Door</TooltipText>
</MouseRect>
Neither of the above attempts worked so I'm sitting scratching my head at the moment and wondering why it doesn't work.
Anyone have any ideas on what I need to do to achieve my goal?