﻿{
	"definitions": [//Dyes: Black=0 Red =1 Green=2 Brown=3 Blue=4 Purple=5 UNU=6 Silver=7 Grey=8 Pink=9 Lime=10 Yellow=11 Light Blue=12 Magenta=13 Orange=14 White=15
		{
			"name": "§3UNU Contractor 4WD Suspension - Back",
			"subName": "",
			"extraMaterialLists": [[],[]]
			//"extraMaterialLists": [[],[]]
		}
	],

	"general": {
		"description": "Vehicle: UNU Contractor\nPart Slot: Back Suspension",
		"stackSize": 1,
		//"materialLists": [["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:0:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:0:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:0:1", "immersiveengineering:material:2:2"],["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:1", "immersiveengineering:stick_steel:2"]]
		"materialLists": [["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:0:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:0:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:0:1", "minecraft:iron_ingot:0:2"],["mts:unuparts.unuparts_crafting_unu_assembled_springs_leaf:1", "mts:unuparts.unuparts_crafting_unu_cast_brakes_drum:1", "mts:unuparts.unuparts_crafting_unu_cast_hubs_standard:1", "minecraft:iron_ingot:2"]]
	},	
	
	"generic": {
		"type": "generic_bodypart_unu_suspension_contractor_back",
		"useVehicleTexture": true,
		"mustBeRemovedByScrewdriver": true,
		"width": 0.25,
		"height": 0.25
	},
	
	"subParts": [
		{
			"pos": [1.1875, 0, 0],
			"turnsWithSteer": true,
			"types": ["ground_wheel"],
			"defaultPart": "unuparts:unuparts_part_unu_wheel_standard",
			"conditionalDefaultParts": {
				"wheel_standard"="unuparts:unuparts_part_unu_wheel_standard",
				"wheel_standard_wire"="unuparts:unuparts_part_unu_wheel_standard_wire",
				"wheel_standard_wireknockoff"="unuparts:unuparts_part_unu_wheel_standard_wireknockoff",
				"wheel_standard_offroad"="unuparts:unuparts_part_unu_wheel_standard_offroad"
			},
			"toneIndex": 1,
			"minValue": 0.75,
			"maxValue": 0.875,
			"applyAfter": "$Axle2"
		},
		{
			"pos": [-1.1875, 0, 0],
			"isMirrored": true,
			"turnsWithSteer": true,
			"types": ["ground_wheel"],
			"defaultPart": "unuparts:unuparts_part_unu_wheel_standard",
			"conditionalDefaultParts": {
				"wheel_standard"="unuparts:unuparts_part_unu_wheel_standard",
				"wheel_standard_wire"="unuparts:unuparts_part_unu_wheel_standard_wire",
				"wheel_standard_wireknockoff"="unuparts:unuparts_part_unu_wheel_standard_wireknockoff",
				"wheel_standard_offroad"="unuparts:unuparts_part_unu_wheel_standard_offroad"
			},
			"toneIndex": 1,
			"minValue": 0.75,
			"maxValue": 0.875,
			"applyAfter": "$Axle2"
		}
	],
	
	"collisionGroups": [
		{
			"collisions": [
				{	//Wheel 1
					"pos": [1.1875, -0.125, 0],
					"width": 0.125,
					"height": 0.125
				}
			],
			"animations": [
				{
					"animationType": "visibility",
					"variable": "part_present_1",
					"clampMin": 0,
					"clampMax": 0
				}
			]
		},
		{
			"collisions": [
				{	//Wheel 2
					"pos": [-1.1875, -0.125, 0],
					"width": 0.125,
					"height": 0.125
				}
			],
			"animations": [
				{
					"animationType": "visibility",
					"variable": "part_present_2",
					"clampMin": 0,
					"clampMax": 0
				}
			]
		}
	],

	"rendering": {
		"animatedObjects": [
			{
				"objectName": "$SuspensionBack",
				"animations": []
			},
			{
				"objectName": "$RearDriveShaft",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType": "translation",
						"variable": "parent_FrameBed_Front_stretch",
						"axis": [0, 0, 1]
					},
					{
						"animationType" : "scaling",
						"variable" : "parent_FrameBed_Front_stretch",
						"centerPoint" : [0, 0.25, 2.9375],
						"axis" : [0, 0, 0.3404],
						"offset": 1
					},
					{
						"animationType" : "rotation",
						"variable" : "parent_FrameBed_Front_stretch",
						"centerPoint": [0, 0.25, 2.9375],
						"axis" : [1.3, 0, 0],
						"offset": -5
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightBack",
						"centerPoint": [0, 0.25, 2.9375],
						"axis" : [0.6061, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftBack",
						"centerPoint": [0, 0.25, 2.9375],
						"axis" : [0.6061, 0, 0]
					},
					{
						"animationType": "rotation",
						"centerPoint": [0, 0.25, 2.9375],
						"axis": [0, 0, -3.55],
						"variable": "parent_engine_driveshaft_rotation_1"
					}
				]
			},
			{
				"objectName": "$Axle2_LeafSpring1",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [0.75, 0.125, -0.6875],
						"axis" : [-4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [0.75, 0.125, -0.6875],
						"axis" : [-0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle2_LeafSpring2",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [-0.75, 0.125, -0.6875],
						"axis" : [-4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [-0.75, 0.125, -0.6875],
						"axis" : [-0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle2_LeafSpring3",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [-0.75, 0.125, 0.6875],
						"axis" : [4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [-0.75, 0.125, 0.6875],
						"axis" : [0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle2_LeafSpring4",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [0.75, 0.125, 0.6875],
						"axis" : [4.1620, 0, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [0.75, 0.125, 0.6875],
						"axis" : [0.9484, 0, 0]
					}
				]
			},
			{
				"objectName": "$Axle2_LeafSpringMountL",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType" : "translation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0510, 0]
					},
					{
						"animationType" : "translation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0115, 0]
					}
				]
			},
			{
				"objectName": "$Axle2_LeafSpringMountR",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType" : "translation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0510, 0]
					},
					{
						"animationType" : "translation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.0115, 0]
					}
				]
			},
			{
				"objectName": "$Axle2",
				"applyAfter": "$SuspensionBack",
				"animations": [
					{
						"animationType" : "translation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.03125, 0]
					},
					{
						"animationType" : "translation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0.03125, 0]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_RightBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0, -1.5074]
					},
					{
						"animationType" : "rotation",
						"variable" : "Wheel_LeftBack",
						"centerPoint" : [0, 0, 0],
						"axis" : [0, 0, 1.5074]
					}
				]
			},
			{
				"objectName": "$LeftBackWheel",
				"applyAfter": "$Axle2",
				"animations": [
					{
						"animationType": "rotation",
						"centerPoint": [1.1875, 0, 0],
						"axis": [1, 0, 0],
						"variable": "ground_rotation_1"
					}
				]
			},
			{
				"objectName": "$RightBackWheel",
				"applyAfter": "$Axle2",
				"animations": [
					{
						"animationType": "rotation",
						"centerPoint": [1.1875, 0, 0],
						"axis": [-1, 0, 0],
						"variable": "ground_rotation_2"
					}
				]
			}
		]
	},
	
	"constantValues": {
		"unuisbest": 1
	},
		
	"variableModifiers": [

		{
			"variable": "Forces_Pitch",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "Forces_Pitch",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "acceleration",
					"axis" : [0, 5, 0]
				},
				{
					"animationType" : "translation",
					"variable": "speed_scaled",
					"axis": [1, 0, 0],
					"clampMin": 0,
					"clampMax": 1
				},
				{
					"animationType": "translation",
					"variable": "Stiffness_Pitch",
					"axis": [-1, 0, 0],
					"offset": 1
				},
				{
					"animationType" : "inhibitor",
					"variable" : "transmission_reversed",
					"clampMin": 0,
					"clampMax": 0
				},
				{
					"animationType": "translation",
					"variable": "transmission_reversed",
					"axis": [-1, 0, 0]
				}
			]
		},
		{
			"variable": "Forces_Roll",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "Forces_Roll",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "rudder",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "speed_scaled",
					"axis" : [0.001, 0, 0]
				},
				{
					"animationType": "translation",
					"variable": "Stiffness_Roll",
					"axis": [-1, 0, 0],
					"offset": 1
				}
			]
		},
		{
			"variable": "Wheel_LeftBack",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "ground_onground_1",
					"axis" : [0, 0, 2],
					"offset": -2
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Roll",
					"axis" : [0, -1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Pitch",
					"axis" : [0, 1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Enable_Suspension",
					"axis" : [1, 0, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Ride_Height_Back",
					"axis" : [0, -1, 0]
				}
			],
			"minValue": -4,
			"maxValue": 2
		},
		{
			"variable": "Wheel_RightBack",
			"animations": [
				{
					"animationType" : "translation",
					"variable" : "ground_onground_2",
					"axis" : [0, 0, 2],
					"offset": -2
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Roll",
					"axis" : [0, 1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Forces_Pitch",
					"axis" : [0, 1, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Enable_Suspension",
					"axis" : [1, 0, 0]
				},
				{
					"animationType" : "translation",
					"variable" : "Ride_Height_Back",
					"axis" : [0, -1, 0]
				}
			],
			"minValue": -4,
			"maxValue": 2
		}
	]
}
