- Messages
- 935
- Country
I am working on a piece of code that has been stumping me for a while now. Basically, I have two separate animations that I am controlling with 2 separate LVARS to trigger them. Each animation has an "in" and "out" state. They are simple animations of rocket launch tower arms: they have a default "IN" state, and they have an "OUT" state where they rotate by 90 degrees on z axis. I have a WASM module that controls these by setting 2 LVARS, one for each anim, to 0 or 1, to indicate states IN and OUT.
Here is my code:
The problem is, as it is structured above, only the top part (CraneIn/CraneOut) works. The Bottom Part (SWINGARM9_IN/SWINGARM9_OUT) works, but only if I comment out the top part (CraneIn/CraneOut). I tried placing them in separate <AnimGraph> blocks, but that didn't work either.
So, the in/out animations work when they are alone in the <AnimGraph> block, but if I want to have the multiple objects/parts with in/out animations, only the top most part works. Since the animations work perfectly when they are alone in the AnimGraph block, obviously there is a structure problem here.
Any Idea what is wrong with the above structure or how I can get this to work?
Here is my code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<ModelInfo guid="{31b46dbf-0c30-4970-bd69-78209e43a9f0}" version="1.1">
<LODS>
<LOD minSize="30" ModelFile="KSC_LUT_APOLLO_0.gltf"/>
<LOD minSize="15" ModelFile="KSC_LUT_APOLLO_1.gltf"/>
<LOD minSize="5" ModelFile="KSC_LUT_APOLLO_2.gltf"/>
<LOD minSize="1" ModelFile="KSC_LUT_APOLLO_3.gltf"/>
</LODS>
<Animation name="CraneOut" guid="4c624960-4a31-4e9e-ba6f-16f792e40133" type="Standard" />
<Animation name="CraneIn" guid="93b9d5d2-70cf-45ee-b1ad-10ba5964c06f" type="Standard" />
<Animation name="SWINGARM9_OUT" guid="d23000d4-7d10-4717-af5b-e2a1704a54bb" type="Standard" />
<Animation name="SWINGARM9_IN" guid="302d1215-5af7-4c37-8909-e16b2f8cb2ed" type="Standard" />
<AnimGraph>
<DefaultState name="CraneIn"/>
<BlendTreeState name="CraneIn">
<Animations>
<Animation guid="93b9d5d2-70cf-45ee-b1ad-10ba5964c06f" loop="false" speed="2" />
</Animations>
</BlendTreeState>
<BlendTreeState name="CraneOut">
<Animations>
<Animation guid="4c624960-4a31-4e9e-ba6f-16f792e40133" loop="false" speed="2" />
</Animations>
</BlendTreeState>
<Transition start="CraneIn" end ="CraneOut">
<Condition>(L:LVAR_TB_KSC_APOLLO_LUT_CRANE_IN_OUT, number) 1.0 == </Condition>
</Transition>
<Transition start="CraneOut" end ="CraneIn">
<Condition>(L:LVAR_TB_KSC_APOLLO_LUT_CRANE_IN_OUT, number) 0.0 == </Condition>
</Transition>
<DefaultState name="SWINGARM9_IN"/>
<BlendTreeState name="SWINGARM9_IN">
<Animations>
<Animation guid="302d1215-5af7-4c37-8909-e16b2f8cb2ed" loop="false" speed="0.001" />
</Animations>
</BlendTreeState>
<BlendTreeState name="SWINGARM9_OUT">
<Animations>
<Animation guid="d23000d4-7d10-4717-af5b-e2a1704a54bb" loop="false" speed="0.001" />
</Animations>
</BlendTreeState>
<Transition start="SWINGARM9_IN" end ="SWINGARM9_OUT">
<Condition>(L:LVAR_TB_KSC_APOLLO_LUT_SWINGARM9_IN_OUT, number) 1.0 == </Condition>
</Transition>
<Transition start="SWINGARM9_OUT" end ="SWINGARM9_IN">
<Condition>(L:LVAR_TB_KSC_APOLLO_LUT_SWINGARM9_IN_OUT, number) 0.0 == </Condition>
</Transition>
</AnimGraph>
</ModelInfo>
The problem is, as it is structured above, only the top part (CraneIn/CraneOut) works. The Bottom Part (SWINGARM9_IN/SWINGARM9_OUT) works, but only if I comment out the top part (CraneIn/CraneOut). I tried placing them in separate <AnimGraph> blocks, but that didn't work either.
So, the in/out animations work when they are alone in the <AnimGraph> block, but if I want to have the multiple objects/parts with in/out animations, only the top most part works. Since the animations work perfectly when they are alone in the AnimGraph block, obviously there is a structure problem here.
Any Idea what is wrong with the above structure or how I can get this to work?
Last edited: