DonBruce64 / MinecraftTransportSimulator

A Minecraft mod that adds planes and automobiles with realistic physics!
Other
109 stars 60 forks source link

Connection Variables glitch when there are multiple connections #1842

Open DrprofLuigi opened 2 weeks ago

DrprofLuigi commented 2 weeks ago

In the following screenshots, the trailer stand has the following animation:

            {
                "objectName": "$Stand",
                "animations": [
                    {
                        "animationType": "translation",
                        "variable": "!connection_1_1_connected",
                        "axis": [0, -0.375, 0]
                    }
                ]
            }

There is an invisiwheel that applies after this part to hold the trailer when no truck is connected.

When the trailer is by itself, everything works as it should:

2024-08-24_18 10 38 2024-08-24_18 10 43

However, when there is a dolly connected to the bumper part on the trailer, the variable connection_1_1_connected seems to get confused and not work properly:

2024-08-24_18 10 14 2024-08-24_18 10 20

I believe this is because somehow connection_1_1_connected is pulling from the bumper part, rather than the trailer:

2024-08-24_18 14 36 2024-08-24_18 14 40

DrprofLuigi commented 2 weeks ago

This may be related to trailer panel buttons not working consistently, as that only a problem when there are multiple connection points possible.

For example, my HUD trailer button does not always reflect the main hitch connection as it is somehow 'linked' to the bumper connection at times.

2024-08-24_18 19 31 2024-08-24_18 19 34 2024-08-24_18 19 36

This dolly was connected via the panel, despite there only being one button, and the truck is already connected to the trailer.

The panel button doesn't change state to 'disconnecting', and instead tries to connect a trailer to the dolly.

In fact, it seems like it is always trying to connect the last connection point in the chain.

DonBruce64 commented 2 weeks ago

Going to table this bug until the CV beta is finished as that re-tools completely how variables work.