modelleicher / FS19_simpleIC

New Interactive Control Script for FS19
65 stars 54 forks source link

Stuck on AttacherControl animation #90

Open ScootersWorkbench opened 3 years ago

ScootersWorkbench commented 3 years ago

Hi, I am trying to animate my rear 3pt Attacher lever and I'm stuck. :) I have the PTO lever animating perfectly. I absolutely love this mod and thank you for making it!

Here is my simpleIC xml:

         <simpleIC>  <!-- outsideInteractionTrigger="sic_playerTrigger" > -->
        <attacherControl attacherIndices="1" >
            <leverAnimation animationName="leverAnimationHyOut" doNotSynch="false" returnToCenter="true" />
            <!-- <insideTrigger triggerPoint="sic_attacherBack_insideTrigger" triggerPointSize="0.04" /> -->
            <!-- <outsideTrigger triggerPoint="sic_attacherBack_outsideTrigger" triggerPointSize="0.04" /> -->
        </attacherControl>
        <ptoControl attacherIndices="1 2 3" >
            <leverAnimation animationName="leverAnimationPTO" doNotSynch="false"  />
            <!-- <insideTrigger triggerPoint="sic_pto_back" triggerPointSize="0.04" />       -->
        </ptoControl>
    </simpleIC>

Here is my section (This section works great)

        <animation name="leverAnimationPTO">
        <part node="ptoRelease" startTime="0" endTime="0.1" startRot="0 0 0" endRot="20 0 0"/>
        <part node="pto"    startTime=".2" endTime=".8" startRot="0 0 0" endRot="-20 0 0"/>
        <part node="ptoRelease" startTime="0.8" endTime="1" startRot="20 0 0" endRot="0 0 0"/>
        </animation>

       <animation name="leverAnimationHyOut">
        <part node="hyOut" startTime="0" endTime="1" startRot="0 0 0" endRot="-20 0 0"/>  (Doesn't work)
        <!-- <part node="hyOut" startTime="0" endTime="1" startRot="20 0 0" endRot="-20 0 0"/> -->  (Doesn't work)
        </animation>

My total rotation for the lever is 20,0,0 to -20,0,0 and I thought that the returnToCenter="true" would set the rotation back to 0,0,0. 20degress forward would raise the implement & -20degress backward would lower the implement.

I'm sure I'm just missing something in the animation, but any guidance would be greatly appreciated.

Thank you for your time. Scooter's Workbench

modelleicher commented 3 years ago

Hi,

My total rotation for the lever is 20,0,0 to -20,0,0 and I thought that the returnToCenter="true" would set the rotation back to 0,0,0. 20degress forward would raise the implement & -20degress backward would lower the implement.

That is how returnToCenter is intended to work yes :)

<attacherControl attacherIndex="1" > It is attacherIndex for attacherControl, not attacherIndices since you can only control one attacher ;)

ScootersWorkbench commented 3 years ago

That works great! Thanks. Just a note for you, you have attacherIndex deprecated in your example file. So that is why I used attacherIndicies.

modelleicher commented 3 years ago

Oh.. my bad