Configuring the part animation
In the Project window, click on the imported FBX object.
In the Inspector window, click on the Animation tab.
Set
Anim. Compressionto Off.Split the animation into four states in the
Clipslist:retracted,deploy,deployedandretract.The retracted and deployed states are a single frame.
You should prefix these states with the part name to avoid confusion if multiple parts of the mod contain animation.
Drop the part under
modeland unpack it completely.In the Part folder, create an Animation Controller.
Double-click on the controller to open the Animator tab.
Drag the four states into the Animator tab.
Start with retracted so that it automatically links to Entry, then the other three.
In the Animator Parameters tab, create:
a boolean
isDeployed,a trigger
reverseAnimStateChange,a float
playbackMulwith a value of 10.
Create the transitions between states:
entry → retracted,
retracted ↔ deploy,
deploy → deployed,
deployed ↔ retract,
retract → retracted.
Click on the transition from retracted to deploy:
set
Exit Timeto 0,uncheck
Has Exit Time,uncheck
Fixed Duration(in Settings),set
Transition Durationto 0,add the boolean
isDeployed= True to the list of conditions,check the animation by playing it in the preview window.
Perform the same operation on the transition from deployed to retract, except that
isDeployed= False.Click on the transition from deploy to retracted:
set
Exit Timeto 0,set
Transition Durationto 0,add the
reverseAnimStateChangetrigger to the list of conditions.
Perform the same operation on the transition from retract to deployed.
Click on the retracted state: Add the
Module_Anim State Informermodule.Perform the same operation on deployed.
Click on the transition from deploy to deployed:
set
Exit Timeto 0.99,set
Transition Durationto 0.01.
Perform the same operation on the transition from retract to retracted.
Click on each state and in
Speed>Multiplier, selectParameter. It should automatically displayplaybackMulin the dropdown. This is for playing the animation ten times faster in the VAB.On the mesh, add the
Animatormodule and select the controller underController.
On the root part, click
Add Component→Module_Deployable. SetAnimatorto the mesh.