Community Forum

Component follows its moving joint with delay

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created07.05.2020 17:48


Lukas Dubnicky (Unknown) 07.05.2020 17:48
SOLUTION PROVIDED BELOW

Hello, I am working on a self loading bale trailer. Rear ramp has an extender, which can dangle on uneven surface, acceleration etc. To accomplish this, extender is made as a separate component with its own mass and connected with a joint to the main component of the trailer with limited rotation:

<components>
<component centerOfMass="0 0.75 0.5" solverIterationCount="10" mass="2800"/>
<component centerOfMass="0 0.3 -0.03" solverIterationCount="10" mass="20"/>
<joint component1="1" component2="2" node="0>6|0|1" rotLimit="10 0 0" transLimit="0 0 0"/>
<collisionPair component1="1" component2="2" enabled="false" />
</components>

Structure of a model can be seen on a screenshot: https://ctrlv.cz/mNas
Component is then in the moving tools:

<movingTool node="0>6|0" playSound="false">
<componentJoint index="1"/>
<dependentPart node="0>6|1"/>
</movingTool>
<movingTool node="0>6|0|1" playSound="false" >
<componentJoint index="1"/>
</movingTool>


And in the moving parts as well:

<movingPart node="0>6|0|1" referencePoint="1>1" referenceFrame="6>0" isActiveDirty="true"/>


To unload the bales, ramp is tipped backwards together with the extender:

<!-- tipping bale ramp -->
<animation name="emptyRotate">
<part node="0>6|0" startTime="0" duration="8" startRot="0 0 0" endRot="105 0 0"/>
</animation>

Problem is that the extender is following the ramp with delay during motion. This is how it is aligned before and after the animation: https://ctrlv.cz/22BD
The delay in the motion can be seen here: https://ctrlv.cz/15U2
The delay (the gap) between where it is and where it should be according to the Joint position seems to be constant during animation.

Default vehicles dont have this problem, Extender component in i3d is: dynamic="true" compound="true" collisionMask="8194" (same as the default vehicles). I tried to increase solverIterationCount, change the mass, didnt help. Only thing that reduces the delay is slowing down the animation, but it is painful solution. It is on 8s and putting it to 16s is annoying and cuts the visible delay to 1/2 but still one can clearly see the moment where it slides in the correct position.

PLEASE, do you have any suggestions? What shall I try? Where shall I ask?

Btw: How is the command anchorActor="0" supposed to work?

Thank you

Bilbo Beutlin (BBeutlin) 08.05.2020 01:16
You need to define the component <joint> more elaborately.
Look into default vehicle xml's. There are several additional attributes to describe the joint behaviour, mainly ..Spring, ..Damper, but also others.

Lukas Dubnicky (Unknown) 09.05.2020 12:55
Thank You for the idea, but look into vaderstad/tempoL16.xml, amazone/cenius80032TXSuper.xml and others. No additional

info is provided for Joints and they work the correct way.

In the meantime, I ve done some more testing:

CAUSE:

Problem was caused by incorrect structure of i3d file. Base shape of moving component works as a collision and moving

collision boxes commonly suffer a delay in motion (it can be seen ingame on F5, showing the collisions). Having a

visible model in substructure of component base shape (collison) means it follows movements including a delay of base

shape.

CONCLUSION:
Visible model of any component must be a part of the main component. All components (other from main) have a base shape

that works as a collison and may only have a reference points or component joints in their substructure in i3d.

SOLUTION:
In an example I provided above, solution is to move a visible heightExtender model from 1>0 to 0>6|0|5. This changes

1>1 unloadingFlapRef to 1>0.

Moving parts entry is then changed:

<movingPart node="0>6|0|5" referencePoint="1>0" referenceFrame="1>0" isActiveDirty="true"/>

Axis orientation I used is:
X axis: always left (port side)
2nd component (1>) and component joint (0>6|0|1): Y axis forward, Z axis upward
unloadingFlapRef (1>0) and heightExtender (0>6|0|5): Y axis upward, Z axis backward


I hope it helps someone.


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