Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

ground_distance not detecting for indivitual parts

BlazeWolf1122 opened this issue ยท 10 comments

commented

image
image

commented

top image references issue #1130 as well

commented

Where is this definition placed in the JSON? On the part or the part slot? What are you trying to reference? The part's distance or the vehicle's distance?

commented

it is placed on the part slot, and it is trying to reference the part's distance from the ground

commented

As of V21, that's not how you reference part variables in part slots. That referencing was changed to the same style of refencing as all other JSON bits in the vehicle. Ergo, you will need to use a part number suffix. This was required to allow part slot animations to use applyAfter for model animations.

commented

is it ground_distance_X? if so, it broke when i tested it
i tested ground_distance_X before making the ticket, but it didn't work
if it's not ground_distance_X, can i have a JSON example of it?

commented

It is ground_distance_x. Though you have to make sure to get your slot correct. If you give me the whole part slot section, and tell me what X is, I can tell you if you did it right or not.

commented

the first 4 parts are wheels, so it should be working
if i put ground_distance_X into the first part slot, then all wheels use the same ground_distance, even though each wheel is supposed to use it's own ground_distance

notice how all wheels act the same like a hivemind, if one wheel is lifted the rest lift, they all lift and drop at the same time
https://user-images.githubusercontent.com/63666200/159859644-ba94984f-748d-45ed-8406-7a74a7b8deab.mp4

This is part slot 1
{
"pos" : [-1, 0, 0],
"types" : ["ground_wheel"],
"defaultPart" : "vashkmat:tire_14",
"minValue" : 0.0,
"maxValue" : 1.0,
"animations": [
{
"animationType" : "inhibitor",
"variable" : "ground_distance_1",
"clampMin" : -1,
"clampMax" : 0.25
},
{
"animationType" : "translation",
"variable" : "ground_distance_1",
"axis" : [0.0,-0.5,0],
"offset": -0.23,
"clampMin": -0.1875,
"clampMax": 0.1875
}
]
},
This is part slot 2
{
"animationType" : "inhibitor",
"variable" : "ground_distance_2",
"clampMin" : -1,
"clampMax" : 0.25
},
{
"animationType" : "translation",
"variable" : "ground_distance_2",
"axis" : [0.0,-0.5,0],
"offset": -0.23,
"clampMin": -0.1875,
"clampMax": 0.1875
}

commented

Yup, that does indeed look broken. Can I get a pack and JSON to test with?

commented

if you still have a version of the pack i sent, i would perfer you edit the json on that specific version
it has the ground_distance, and just needs to be changed to ground_distance_X

commented

Fixed in V21.2.0.