Community Forum

Problem with trailer - doesn't want to turn

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created13.04.2020 21:34


Unknown 13.04.2020 21:34
Hi, thanks in advance for any help! I've recently gotten back into modding, and I'm building a small trailer. But I have a problem with this trailer. When it is attached to a vehicle, it doesn't want to turn. You can drive, and you can turn the car, but the trailer will always keep the same orientation. So you can drive, and turn, and the car will go the right direction, as will the trailer, but the trailer will be at an angle to the car. It seems like the trailer can't pivot around its own.

The collision mask is 802102, which I believe is correct for a trailer. I've double checked all the rigid body attributes, and everything seems fine. The collision for the trailer, which is the parent (0>) is dynamic and a compound, everything below it is compoundChild. Except foor the exactfillrootnode and the tensionbeltactivation trigger, which are respectively a kinematic compound and a kinematic trigger, just as in the basegame vehicles. I actually just copied the way basegame vehicles are built.

this is the <base> tag:

<base>
<typeDesc>$l10n_typeDesc_tipper</typeDesc>
<filename>anssems250.i3d</filename>
<size width="1.5" length="3.5" lengthOffset="0"/>
<components>
<component centerOfMass="0 0 0" solverIterationCount="4" mass="400"/>
</components>
<schemaOverlay attacherJointPosition="0 0">
<default name="DEFAULT_IMPLEMENT"/>
<selected name="DEFAULT_IMPLEMENT_SELECTED"/>
</schemaOverlay>
</base>


and this is the attacher tag:

<attachable>
<inputAttacherJoints>
<inputAttacherJoint node="attacherJoint" jointType="trailerLow" attacherHeight="0" />
</inputAttacherJoints>
<support animationName="moveSupport"/>
<brakeForce>0.6</brakeForce>
</attachable>

I've double checked everything, and everything in the xml and the i3d has the same settings as basegame trailers. I did make the collision for the trailer myself, but I've given it the same attributes so I don't see how that would matter.

Anyone any idea what would cause this, what I did wrong? Because I obviously did something wrong..

Bilbo Beutlin (BBeutlin) 14.04.2020 04:03
Compare once more step-for-step your i3d parts with those of a default trailer.
I'd assume you've made mistakes by the compound and compoundChild attributes. Usually only additional collisions should have the 'compoundChild' property.
Can also be, you have identic parts multiple defined as 'rigid body'.

Unknown 14.04.2020 18:44
Hi, thanks for your reply!
I double checked everything once more. Everything is identical to basegame trailers. I compared with the smallest Strautmann trailer, I believe its called SEK802. The only thing I did notice was that in the rigid body attributes, the center of mass doesn't show numbers. It shows '-nan(Ind) -nan(Ind) -nan(Ind). Could this be the cause? As I said, I made the parent collision myself. Maybe something went wrong there?


EDIT: I found the culprit. The backdoor collision (which I also made myself) causes the -nan(Ind) thing in the center of mass field. Once this collision is set as dynamic, or as a compoundChild of a dynamic collision, this happens. And it transfers the -nan(Ind) error to the parent collision. Removing that collision solves the original problem of the trailer not wanting to turn.
After researching this online -nan(Ind) seems to be something math related, and would mean you have a mathematically undefined (eg. dividing by zero) result of a calculation, in this case the calculation for center of mass. I assume in this case somewhere in the calculation for center of mass a square root of a negative number is taken, which is mathematically undefined.
Knowing this, do you have any idea what would cause this? And why this only happens if the collision is set to dynamic?
The collision in question is just a rectangle, about 5cm deep, 1.3m wide and 40cm high. As I always do, I froze to pivot in the exporter and then froze all transformations, before exporting.


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