├── README.md ├── .gitignore ├── Assets ├── CraneExample │ ├── Crane_v2.FBX │ ├── Prefab │ │ ├── Materials │ │ │ ├── NavyGrid.mat.meta │ │ │ ├── ground.mat.meta │ │ │ ├── Vehicle_HoverTransporter_A2.mat.meta │ │ │ ├── ground.mat │ │ │ ├── Vehicle_HoverTransporter_A2.mat │ │ │ └── NavyGrid.mat │ │ ├── Textures │ │ │ ├── GridEmissive.png │ │ │ ├── SwatchNavyAlbedo.png │ │ │ ├── GridEmissive.png.meta │ │ │ └── SwatchNavyAlbedo.png.meta │ │ ├── _Ground.prefab.meta │ │ ├── Materials.meta │ │ ├── Textures.meta │ │ └── _Ground.prefab │ ├── CraneExample.unity.meta │ ├── Prefab.meta │ ├── CraneInputs.cs.meta │ ├── CraneInputs.cs │ └── Crane_v2.FBX.meta └── CraneExample.meta ├── Packages └── manifest.json └── ProjectSettings └── InputManager.asset /README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Library 2 | Logs 3 | obj 4 | ProjectSettings/* 5 | !ProjectSettings/InputManager.asset 6 | -------------------------------------------------------------------------------- /Assets/CraneExample/Crane_v2.FBX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/animation-rigging-crane-example/master/Assets/CraneExample/Crane_v2.FBX -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Materials/NavyGrid.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76ff537c8e1a84345868e6aeee938ab3 3 | NativeFormatImporter: 4 | userData: 5 | assetBundleName: 6 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Textures/GridEmissive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/animation-rigging-crane-example/master/Assets/CraneExample/Prefab/Textures/GridEmissive.png -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Textures/SwatchNavyAlbedo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unity-Technologies/animation-rigging-crane-example/master/Assets/CraneExample/Prefab/Textures/SwatchNavyAlbedo.png -------------------------------------------------------------------------------- /Assets/CraneExample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6349b0ac052b4fafaa0c8637f793125 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CraneExample/CraneExample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27a8c4bf887b4493cb8fb30b9f9a065c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/_Ground.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6201e445200df467b8487609440bffa3 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64c899233d8ff4d2ab585dc236b862b5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b1ed58494ac74937b3af2bd7ed2208d 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aea7a909a78ca483e8735d25e1bcf5fa 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Materials/ground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecdb94bc9d4c042a8b959d86f5366687 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Materials/Vehicle_HoverTransporter_A2.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a15577b93cad842b396e2993aa23c9ae 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/CraneExample/CraneInputs.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e069c19ca332144198fc81bffeb7fafd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Textures/GridEmissive.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a196fd6788131ec459bfb26012466fc1 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: 2 31 | aniso: 4 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Textures/SwatchNavyAlbedo.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86e4aa9207c9e2740b6ace599d659c05 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 32 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 0 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.2d.sprite": "1.0.0", 4 | "com.unity.2d.tilemap": "1.0.0", 5 | "com.unity.ads": "2.0.8", 6 | "com.unity.analytics": "3.2.2", 7 | "com.unity.animation.rigging": "0.2.1-preview", 8 | "com.unity.collab-proxy": "1.2.16", 9 | "com.unity.ext.nunit": "1.0.0", 10 | "com.unity.ide.rider": "1.0.2", 11 | "com.unity.ide.visualstudio": "1.0.3", 12 | "com.unity.ide.vscode": "1.0.3", 13 | "com.unity.multiplayer-hlapi": "1.0.2", 14 | "com.unity.package-manager-ui": "2.2.0", 15 | "com.unity.purchasing": "2.0.6", 16 | "com.unity.test-framework": "1.0.11", 17 | "com.unity.textmeshpro": "1.3.0", 18 | "com.unity.timeline": "1.0.0", 19 | "com.unity.xr.legacyinputhelpers": "2.0.2", 20 | "com.unity.modules.ai": "1.0.0", 21 | "com.unity.modules.androidjni": "1.0.0", 22 | "com.unity.modules.animation": "1.0.0", 23 | "com.unity.modules.assetbundle": "1.0.0", 24 | "com.unity.modules.audio": "1.0.0", 25 | "com.unity.modules.cloth": "1.0.0", 26 | "com.unity.modules.director": "1.0.0", 27 | "com.unity.modules.imageconversion": "1.0.0", 28 | "com.unity.modules.imgui": "1.0.0", 29 | "com.unity.modules.jsonserialize": "1.0.0", 30 | "com.unity.modules.particlesystem": "1.0.0", 31 | "com.unity.modules.physics": "1.0.0", 32 | "com.unity.modules.physics2d": "1.0.0", 33 | "com.unity.modules.screencapture": "1.0.0", 34 | "com.unity.modules.terrain": "1.0.0", 35 | "com.unity.modules.terrainphysics": "1.0.0", 36 | "com.unity.modules.tilemap": "1.0.0", 37 | "com.unity.modules.ui": "1.0.0", 38 | "com.unity.modules.uielements": "1.0.0", 39 | "com.unity.modules.umbra": "1.0.0", 40 | "com.unity.modules.unityanalytics": "1.0.0", 41 | "com.unity.modules.unitywebrequest": "1.0.0", 42 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 43 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 44 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 45 | "com.unity.modules.unitywebrequestwww": "1.0.0", 46 | "com.unity.modules.vehicles": "1.0.0", 47 | "com.unity.modules.video": "1.0.0", 48 | "com.unity.modules.vr": "1.0.0", 49 | "com.unity.modules.wind": "1.0.0", 50 | "com.unity.modules.xr": "1.0.0" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Materials/ground.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ground 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0.5 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 1, g: 1, b: 1, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 78 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Materials/Vehicle_HoverTransporter_A2.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: Vehicle_HoverTransporter_A2 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: 13 | m_LightmapFlags: 4 14 | m_EnableInstancingVariants: 0 15 | m_DoubleSidedGI: 0 16 | m_CustomRenderQueue: -1 17 | stringTagMap: {} 18 | disabledShaderPasses: [] 19 | m_SavedProperties: 20 | serializedVersion: 3 21 | m_TexEnvs: 22 | - _BumpMap: 23 | m_Texture: {fileID: 0} 24 | m_Scale: {x: 1, y: 1} 25 | m_Offset: {x: 0, y: 0} 26 | - _DetailAlbedoMap: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - _DetailMask: 31 | m_Texture: {fileID: 0} 32 | m_Scale: {x: 1, y: 1} 33 | m_Offset: {x: 0, y: 0} 34 | - _DetailNormalMap: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | - _EmissionMap: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - _MainTex: 43 | m_Texture: {fileID: 0} 44 | m_Scale: {x: 1, y: 1} 45 | m_Offset: {x: 0, y: 0} 46 | - _MetallicGlossMap: 47 | m_Texture: {fileID: 0} 48 | m_Scale: {x: 1, y: 1} 49 | m_Offset: {x: 0, y: 0} 50 | - _OcclusionMap: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - _ParallaxMap: 55 | m_Texture: {fileID: 0} 56 | m_Scale: {x: 1, y: 1} 57 | m_Offset: {x: 0, y: 0} 58 | m_Floats: 59 | - _BumpScale: 1 60 | - _Cutoff: 0.5 61 | - _DetailNormalMapScale: 1 62 | - _DstBlend: 0 63 | - _GlossMapScale: 1 64 | - _Glossiness: 0 65 | - _GlossyReflections: 1 66 | - _Metallic: 0 67 | - _Mode: 0 68 | - _OcclusionStrength: 1 69 | - _Parallax: 0.02 70 | - _SmoothnessTextureChannel: 0 71 | - _SpecularHighlights: 1 72 | - _SrcBlend: 1 73 | - _UVSec: 0 74 | - _ZWrite: 1 75 | m_Colors: 76 | - _Color: {r: 0, g: 0.1496469, b: 0.636, a: 1} 77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 0} 78 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/_Ground.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3052472259002758640 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 2446644529070981349} 12 | - component: {fileID: 3496383407654366650} 13 | - component: {fileID: 4858005372814819397} 14 | - component: {fileID: 5636378933565847430} 15 | m_Layer: 0 16 | m_Name: _Ground 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!4 &2446644529070981349 23 | Transform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 3052472259002758640} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 200, y: 1, z: 200} 32 | m_Children: [] 33 | m_Father: {fileID: 0} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | --- !u!33 &3496383407654366650 37 | MeshFilter: 38 | m_ObjectHideFlags: 0 39 | m_CorrespondingSourceObject: {fileID: 0} 40 | m_PrefabInstance: {fileID: 0} 41 | m_PrefabAsset: {fileID: 0} 42 | m_GameObject: {fileID: 3052472259002758640} 43 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 44 | --- !u!23 &4858005372814819397 45 | MeshRenderer: 46 | m_ObjectHideFlags: 0 47 | m_CorrespondingSourceObject: {fileID: 0} 48 | m_PrefabInstance: {fileID: 0} 49 | m_PrefabAsset: {fileID: 0} 50 | m_GameObject: {fileID: 3052472259002758640} 51 | m_Enabled: 1 52 | m_CastShadows: 1 53 | m_ReceiveShadows: 1 54 | m_DynamicOccludee: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 1 57 | m_ReflectionProbeUsage: 1 58 | m_RenderingLayerMask: 1 59 | m_RendererPriority: 0 60 | m_Materials: 61 | - {fileID: 2100000, guid: 76ff537c8e1a84345868e6aeee938ab3, type: 2} 62 | m_StaticBatchInfo: 63 | firstSubMesh: 0 64 | subMeshCount: 0 65 | m_StaticBatchRoot: {fileID: 0} 66 | m_ProbeAnchor: {fileID: 0} 67 | m_LightProbeVolumeOverride: {fileID: 0} 68 | m_ScaleInLightmap: 1 69 | m_ReceiveGI: 1 70 | m_PreserveUVs: 0 71 | m_IgnoreNormalsForChartDetection: 0 72 | m_ImportantGI: 0 73 | m_StitchLightmapSeams: 0 74 | m_SelectedEditorRenderState: 3 75 | m_MinimumChartSize: 4 76 | m_AutoUVMaxDistance: 0.5 77 | m_AutoUVMaxAngle: 89 78 | m_LightmapParameters: {fileID: 0} 79 | m_SortingLayerID: 0 80 | m_SortingLayer: 0 81 | m_SortingOrder: 0 82 | --- !u!64 &5636378933565847430 83 | MeshCollider: 84 | m_ObjectHideFlags: 0 85 | m_CorrespondingSourceObject: {fileID: 0} 86 | m_PrefabInstance: {fileID: 0} 87 | m_PrefabAsset: {fileID: 0} 88 | m_GameObject: {fileID: 3052472259002758640} 89 | m_Material: {fileID: 0} 90 | m_IsTrigger: 0 91 | m_Enabled: 1 92 | serializedVersion: 3 93 | m_Convex: 0 94 | m_CookingOptions: 14 95 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 96 | -------------------------------------------------------------------------------- /Assets/CraneExample/Prefab/Materials/NavyGrid.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: NavyGrid 11 | m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ShaderKeywords: _EMISSION _EMISSIONMAP _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME 13 | _UVSEC_UV1 14 | m_LightmapFlags: 0 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 2800000, guid: a196fd6788131ec459bfb26012466fc1, type: 3} 41 | m_Scale: {x: 200, y: 200} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 2800000, guid: 86e4aa9207c9e2740b6ace599d659c05, type: 3} 45 | m_Scale: {x: 200, y: 200} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _Occlusion: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _OcclusionMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | - _ParallaxMap: 60 | m_Texture: {fileID: 0} 61 | m_Scale: {x: 1, y: 1} 62 | m_Offset: {x: 0, y: 0} 63 | - _SpecGlossMap: 64 | m_Texture: {fileID: 0} 65 | m_Scale: {x: 1, y: 1} 66 | m_Offset: {x: 0, y: 0} 67 | m_Floats: 68 | - _AlphaTestRef: 0.5 69 | - _BumpScale: 1 70 | - _Cutoff: 0.5 71 | - _DetailNormalMapScale: 1 72 | - _DstBlend: 0 73 | - _EmissionScaleUI: 2 74 | - _GlossMapScale: 1 75 | - _Glossiness: 0.1 76 | - _GlossyReflections: 1 77 | - _Lightmapping: 1 78 | - _Metallic: 0.1 79 | - _Mode: 0 80 | - _OcclusionStrength: 1 81 | - _Parallax: 0.02 82 | - _SmoothnessTextureChannel: 0 83 | - _SpecularHighlights: 1 84 | - _SrcBlend: 1 85 | - _UVSec: 0 86 | - _ZWrite: 1 87 | m_Colors: 88 | - _Color: {r: 1, g: 1, b: 1, a: 1} 89 | - _EmissionColor: {r: 2.1185474, g: 2.1185474, b: 2.1185474, a: 1.3348337} 90 | - _EmissionColorUI: {r: 0, g: 0, b: 0, a: 1} 91 | - _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1} 92 | - _SpecColor: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1} 93 | - _SpecularColor: {r: 0.15686275, g: 0.15686275, b: 0.15686275, a: 1} 94 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Rotation 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: a 13 | positiveButton: d 14 | altNegativeButton: 15 | altPositiveButton: 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: FwdBck 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: s 29 | positiveButton: w 30 | altNegativeButton: 31 | altPositiveButton: 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Drop 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: joystick button 0 46 | altNegativeButton: 47 | altPositiveButton: space 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Pivot 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: left 61 | positiveButton: right 62 | altNegativeButton: 63 | altPositiveButton: 64 | gravity: 3 65 | dead: 0.001 66 | sensitivity: 3 67 | snap: 1 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: UpDown 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: down 77 | positiveButton: up 78 | altNegativeButton: 79 | altPositiveButton: 80 | gravity: 3 81 | dead: 0.001 82 | sensitivity: 3 83 | snap: 1 84 | invert: 0 85 | type: 0 86 | axis: 1 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Rotation 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 0 97 | dead: 0.19 98 | sensitivity: 1 99 | snap: 0 100 | invert: 0 101 | type: 2 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Pivot 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0.19 114 | sensitivity: 1 115 | snap: 0 116 | invert: 0 117 | type: 2 118 | axis: 2 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: FwdBck 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0.19 130 | sensitivity: 1 131 | snap: 0 132 | invert: 1 133 | type: 2 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: UpDown 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0.19 146 | sensitivity: 1 147 | snap: 0 148 | invert: 1 149 | type: 2 150 | axis: 3 151 | joyNum: 0 152 | -------------------------------------------------------------------------------- /Assets/CraneExample/CraneInputs.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.Animations.Rigging; 5 | 6 | public class CraneInputs : MonoBehaviour 7 | { 8 | public Transform ikRotation; 9 | public Transform iKHandle; 10 | public Transform clampPivot; 11 | public bool clamp; 12 | float smoothTime = 0.3f; 13 | float liftVelocity = 0.0f; 14 | float clampVelocity = 0.0f; 15 | public GameObject containerCon; 16 | public Transform IK_RC; 17 | public Transform IK_LC; 18 | public Transform RCLift; 19 | public Transform LCLift; 20 | void Update() 21 | { 22 | //base rotation 23 | float turn = Input.GetAxis ("Rotation"); 24 | var ikRot = Quaternion.Euler(0,turn,0); 25 | ikRotation.transform.rotation *= ikRot; 26 | 27 | //IK forward distance 28 | float fwd = Input.GetAxis ("FwdBck"); 29 | Vector3 fwdVector = iKHandle.transform.rotation * Vector3.forward * (fwd); 30 | iKHandle.transform.position += fwdVector; 31 | 32 | //IK up/down 33 | float vert = Input.GetAxis ("UpDown"); 34 | Vector3 upVector = iKHandle.transform.rotation * Vector3.up * (vert); 35 | iKHandle.transform.position += upVector; 36 | 37 | //clamp pivot 38 | float pivot = Input.GetAxis ("Pivot"); 39 | var tip = Quaternion.Euler(0,pivot,0); 40 | clampPivot.transform.rotation *= tip; 41 | 42 | //input limits 43 | float zLimit = iKHandle.transform.localPosition.z; 44 | float yLimit = iKHandle.transform.localPosition.y; 45 | zLimit = Mathf.Clamp(zLimit, 12.0f, 38.0f); 46 | Vector3 zVector = new Vector3 (0,0,zLimit); 47 | yLimit = Mathf.Clamp(yLimit, -8.0f, 12.0f); 48 | Vector3 yVector = new Vector3 (0,yLimit,0); 49 | 50 | Vector3 ikVector = yVector + zVector; 51 | iKHandle.transform.localPosition = ikVector; 52 | 53 | 54 | // CLAMPS 55 | if (Input.GetButtonDown("Drop")) 56 | { 57 | clamp = !clamp; 58 | } 59 | 60 | //Container drop 61 | var cPConstraint = containerCon.GetComponent(); 62 | var cPconstraintData = cPConstraint.data; 63 | cPConstraint.weight = clamp ? 1.0f : 0.0f; 64 | var containerRBc = containerCon.GetComponent(); 65 | containerRBc.isKinematic = clamp ? true : false; 66 | 67 | //Right Lift 68 | float xLR = RCLift.transform.localPosition.x; 69 | float yLR = clamp ? 0 : 2; 70 | float liftPosition = Mathf.SmoothDamp(RCLift.transform.localPosition.y, yLR, ref liftVelocity, smoothTime); 71 | float zLR = RCLift.transform.localPosition.z; 72 | var rightLift = new Vector3(xLR,liftPosition,zLR); 73 | RCLift.transform.localPosition = rightLift; 74 | 75 | //Left Lift 76 | float xLL = RCLift.transform.localPosition.x; 77 | var leftLift = new Vector3(xLL,-liftPosition,zLR); 78 | LCLift.transform.localPosition = leftLift; 79 | 80 | //Right Clamp IK 81 | float xCR = clamp ? -4.75f : -3.8f; 82 | float clampPosition = Mathf.SmoothDamp(IK_RC.transform.localPosition.x, xCR, ref clampVelocity, smoothTime); 83 | float yCR = IK_RC.transform.localPosition.y; 84 | float zCR = IK_RC.transform.localPosition.z; 85 | var rightClamp = new Vector3(clampPosition,yCR,zCR); 86 | IK_RC.transform.localPosition = rightClamp; 87 | 88 | //Left Clamp IK 89 | float yCL = IK_LC.transform.localPosition.y; 90 | var leftClamp = new Vector3(clampPosition,yCL,zCR); 91 | IK_LC.transform.localPosition = leftClamp; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Assets/CraneExample/Crane_v2.FBX.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5051b1e31cee74cf6b7c88c11e923828 3 | ModelImporter: 4 | serializedVersion: 26 5 | internalIDToNameTable: 6 | - first: 7 | 74: 1827226128182048838 8 | second: Take 001 9 | externalObjects: {} 10 | materials: 11 | importMaterials: 1 12 | materialName: 0 13 | materialSearch: 1 14 | materialLocation: 1 15 | animations: 16 | legacyGenerateAnimations: 4 17 | bakeSimulation: 0 18 | resampleCurves: 1 19 | optimizeGameObjects: 0 20 | motionNodeName: 21 | rigImportErrors: 22 | rigImportWarnings: 23 | animationImportErrors: 24 | animationImportWarnings: 25 | animationRetargetingWarnings: 26 | animationDoRetargetingWarnings: 0 27 | importAnimatedCustomProperties: 0 28 | importConstraints: 0 29 | animationCompression: 1 30 | animationRotationError: 0.5 31 | animationPositionError: 0.5 32 | animationScaleError: 0.5 33 | animationWrapMode: 0 34 | extraExposedTransformPaths: [] 35 | extraUserProperties: [] 36 | clipAnimations: 37 | - serializedVersion: 16 38 | name: Take 001 39 | takeName: Take 001 40 | internalID: 1827226128182048838 41 | firstFrame: 0 42 | lastFrame: 100 43 | wrapMode: 0 44 | orientationOffsetY: 0 45 | level: 0 46 | cycleOffset: 0 47 | loop: 0 48 | hasAdditiveReferencePose: 0 49 | loopTime: 0 50 | loopBlend: 0 51 | loopBlendOrientation: 0 52 | loopBlendPositionY: 0 53 | loopBlendPositionXZ: 0 54 | keepOriginalOrientation: 0 55 | keepOriginalPositionY: 1 56 | keepOriginalPositionXZ: 0 57 | heightFromFeet: 0 58 | mirror: 0 59 | bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 60 | curves: [] 61 | events: [] 62 | transformMask: [] 63 | maskType: 3 64 | maskSource: {instanceID: 0} 65 | additiveReferencePoseFrame: 0 66 | isReadable: 0 67 | meshes: 68 | lODScreenPercentages: [] 69 | globalScale: 1 70 | meshCompression: 0 71 | addColliders: 0 72 | useSRGBMaterialColor: 1 73 | importVisibility: 1 74 | importBlendShapes: 1 75 | importCameras: 1 76 | importLights: 1 77 | swapUVChannels: 0 78 | generateSecondaryUV: 0 79 | useFileUnits: 1 80 | keepQuads: 0 81 | weldVertices: 1 82 | preserveHierarchy: 0 83 | skinWeightsMode: 0 84 | maxBonesPerVertex: 4 85 | minBoneWeight: 0.001 86 | meshOptimizationFlags: -1 87 | indexFormat: 0 88 | secondaryUVAngleDistortion: 8 89 | secondaryUVAreaDistortion: 15.000001 90 | secondaryUVHardAngle: 88 91 | secondaryUVPackMargin: 4 92 | useFileScale: 1 93 | tangentSpace: 94 | normalSmoothAngle: 60 95 | normalImportMode: 0 96 | tangentImportMode: 3 97 | normalCalculationMode: 4 98 | legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 99 | blendShapeNormalImportMode: 1 100 | normalSmoothingSource: 0 101 | referencedClips: [] 102 | importAnimation: 1 103 | copyAvatar: 0 104 | humanDescription: 105 | serializedVersion: 3 106 | human: [] 107 | skeleton: [] 108 | armTwist: 0.5 109 | foreArmTwist: 0.5 110 | upperLegTwist: 0.5 111 | legTwist: 0.5 112 | armStretch: 0.05 113 | legStretch: 0.05 114 | feetSpacing: 0 115 | globalScale: 1 116 | rootMotionBoneName: 117 | hasTranslationDoF: 0 118 | hasExtraRoot: 0 119 | skeletonHasParents: 1 120 | lastHumanDescriptionAvatarSource: {instanceID: 0} 121 | animationType: 2 122 | humanoidOversampling: 1 123 | additionalBone: 0 124 | userData: 125 | assetBundleName: 126 | assetBundleVariant: 127 | --------------------------------------------------------------------------------