Code: Select all
<animation name="unloading">
<part node="controlLever" startTime="0" endTime="0.1" direction="1" startRot="0 0 0" endRot="0 0 -20"/>
<part node="controlLever" startTime="0.1" endTime="9.9" direction="1" startRot="0 0 -20" endRot="0 0 -20"/>
<part node="controlLever" startTime="9.9" endTime="10" direction="1" startRot="0 0 -20" endRot="0 0 0"/>
<part node="controlLever" startTime="0" endTime="0.1" direction="-1" startRot="0 0 0" endRot="0 0 20"/>
<part node="controlLever" startTime="0.1" endTime="9.9" direction="-1" startRot="0 0 20" endRot="0 0 20"/>
<part node="controlLever" startTime="9.9" endTime="10" direction="-1" startRot="0 0 20" endRot="0 0 0"/>
</animation>
The problem is once I cancel the unloading process midway, control lever will not immediately rotate to the another direction. Cause the triggering time of its rotation is only at the beginning and end of the unloading process. So how to write animation code to achieve that the control lever can switch states and rotate to another positions at any time during the unloading process?