Community Forum

Animation question

Forum Overview >> Farming Simulator 22

CategoryFarming Simulator 22
Created04.07.2023 08:01

Wenjie Feng (HatsuneKid) 04.07.2023 08:01
There is a hooklift trailer whose unloading animation code is as follows:
<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"/>
I want that control lever to rotate at different angles in both directions of unloading animation. This is to simulate the rotation of the control lever in different directions to control the lifting and lowering of the dump bucket. And it work well without any error.

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?

Note: Log in to post. Create a new account here.