From 831b4375a41ab1371fb0ef79e48b4d5703084b5f Mon Sep 17 00:00:00 2001 From: Neil Kollack Date: Sat, 9 Apr 2022 16:09:50 -0500 Subject: wip: DistanceHinge prototype --- Assets/AutoSave.meta | 8 + Assets/Materials.meta | 8 + Assets/Materials/Rope_Material.mat | 88 ++++++++++ Assets/Materials/Rope_Material.mat.meta | 8 + Assets/Prefabs/Hook.prefab | 244 +++++++++++++++++++++++++++ Assets/Prefabs/Hook.prefab.meta | 7 + Assets/Prefabs/Player.prefab | 228 +++++++++++++++++++++++++ Assets/Prefabs/Player.prefab.meta | 7 + Assets/Scenes/Jungle.unity | 268 +++++++----------------------- Assets/Scripts/RopePrototype.cs | 45 +++++ Assets/Scripts/RopePrototype.cs.meta | 11 ++ Assets/Scripts/RopeThrowPrototype.cs | 37 +++++ Assets/Scripts/RopeThrowPrototype.cs.meta | 11 ++ 13 files changed, 764 insertions(+), 206 deletions(-) create mode 100644 Assets/AutoSave.meta create mode 100644 Assets/Materials.meta create mode 100644 Assets/Materials/Rope_Material.mat create mode 100644 Assets/Materials/Rope_Material.mat.meta create mode 100644 Assets/Prefabs/Hook.prefab create mode 100644 Assets/Prefabs/Hook.prefab.meta create mode 100644 Assets/Prefabs/Player.prefab create mode 100644 Assets/Prefabs/Player.prefab.meta create mode 100644 Assets/Scripts/RopePrototype.cs create mode 100644 Assets/Scripts/RopePrototype.cs.meta create mode 100644 Assets/Scripts/RopeThrowPrototype.cs create mode 100644 Assets/Scripts/RopeThrowPrototype.cs.meta diff --git a/Assets/AutoSave.meta b/Assets/AutoSave.meta new file mode 100644 index 0000000..7d0ac55 --- /dev/null +++ b/Assets/AutoSave.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bc4d797f7e196f84bb6c3946a7ee23c3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials.meta b/Assets/Materials.meta new file mode 100644 index 0000000..1697cdc --- /dev/null +++ b/Assets/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3666f50d0c53d344b9b9f7c4c2a274ae +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/Rope_Material.mat b/Assets/Materials/Rope_Material.mat new file mode 100644 index 0000000..c9c9734 --- /dev/null +++ b/Assets/Materials/Rope_Material.mat @@ -0,0 +1,88 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Rope_Material + m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AlphaTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - PixelSnap: 0 + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _EnableExternalAlpha: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.5019608, g: 0.3137255, b: 0.21176471, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _Flip: {r: 1, g: 1, b: 1, a: 1} + - _RendererColor: {r: 1, g: 1, b: 1, a: 1} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/Rope_Material.mat.meta b/Assets/Materials/Rope_Material.mat.meta new file mode 100644 index 0000000..9841bbf --- /dev/null +++ b/Assets/Materials/Rope_Material.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 21fabd64e29cc1b4d90d20f3ea555583 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Hook.prefab b/Assets/Prefabs/Hook.prefab new file mode 100644 index 0000000..07111ea --- /dev/null +++ b/Assets/Prefabs/Hook.prefab @@ -0,0 +1,244 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5459487145348792490 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5292233442489985081} + - component: {fileID: 2084086308211567763} + - component: {fileID: 6147527193818829530} + - component: {fileID: 1691718980560836411} + - component: {fileID: -2244153933399610223} + - component: {fileID: -1471091967506001749} + m_Layer: 0 + m_Name: Hook + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5292233442489985081 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5459487145348792490} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 6, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &2084086308211567763 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5459487145348792490} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: -2413806693520163455, guid: a86470a33a6bf42c4b3595704624658b, type: 3} + m_Color: {r: 1, g: 0.9255588, b: 0, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1, y: 1} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!50 &6147527193818829530 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5459487145348792490} + m_BodyType: 1 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!232 &1691718980560836411 +DistanceJoint2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5459487145348792490} + m_Enabled: 1 + serializedVersion: 4 + m_EnableCollision: 0 + m_ConnectedRigidBody: {fileID: 0} + m_BreakForce: Infinity + m_BreakTorque: Infinity + m_AutoConfigureConnectedAnchor: 0 + m_Anchor: {x: 0, y: 0} + m_ConnectedAnchor: {x: 0, y: 0} + m_AutoConfigureDistance: 1 + m_Distance: 6 + m_MaxDistanceOnly: 0 +--- !u!114 &-2244153933399610223 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5459487145348792490} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f828efbe27e65524c9d7e0d87b6a6f0f, type: 3} + m_Name: + m_EditorClassIdentifier: + player: {fileID: 0} + lr: {fileID: 0} + dj: {fileID: 0} +--- !u!120 &-1471091967506001749 +LineRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5459487145348792490} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 0 + m_LightProbeUsage: 0 + m_ReflectionProbeUsage: 0 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 21fabd64e29cc1b4d90d20f3ea555583, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: -1 + m_Positions: + - {x: 0, y: 0, z: 0} + - {x: 0, y: 0, z: 1} + m_Parameters: + serializedVersion: 3 + widthMultiplier: 0.25 + widthCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + colorGradient: + serializedVersion: 2 + key0: {r: 1, g: 1, b: 1, a: 1} + key1: {r: 1, g: 1, b: 1, a: 1} + key2: {r: 0, g: 0, b: 0, a: 0} + key3: {r: 0, g: 0, b: 0, a: 0} + key4: {r: 0, g: 0, b: 0, a: 0} + key5: {r: 0, g: 0, b: 0, a: 0} + key6: {r: 0, g: 0, b: 0, a: 0} + key7: {r: 0, g: 0, b: 0, a: 0} + ctime0: 0 + ctime1: 65535 + ctime2: 0 + ctime3: 0 + ctime4: 0 + ctime5: 0 + ctime6: 0 + ctime7: 0 + atime0: 0 + atime1: 65535 + atime2: 0 + atime3: 0 + atime4: 0 + atime5: 0 + atime6: 0 + atime7: 0 + m_Mode: 0 + m_NumColorKeys: 2 + m_NumAlphaKeys: 2 + numCornerVertices: 0 + numCapVertices: 0 + alignment: 0 + textureMode: 0 + shadowBias: 0.5 + generateLightingData: 0 + m_UseWorldSpace: 1 + m_Loop: 0 diff --git a/Assets/Prefabs/Hook.prefab.meta b/Assets/Prefabs/Hook.prefab.meta new file mode 100644 index 0000000..9c646d1 --- /dev/null +++ b/Assets/Prefabs/Hook.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c5636787c9fa65743baae65d7537d65c +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab new file mode 100644 index 0000000..7d1fc4c --- /dev/null +++ b/Assets/Prefabs/Player.prefab @@ -0,0 +1,228 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &5555712667017248113 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5555712667017248116} + - component: {fileID: 5555712667017248117} + - component: {fileID: 5555712667017248115} + - component: {fileID: 5555712667017248077} + - component: {fileID: 5555712667017248078} + - component: {fileID: 5555712667017248079} + - component: {fileID: 5555712667017248076} + - component: {fileID: -784960068083288243} + m_Layer: 0 + m_Name: Player + m_TagString: Player + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &5555712667017248116 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 2, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!212 &5555712667017248117 +SpriteRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 0 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_Sprite: {fileID: 2055064200, guid: 72a632f763991754fb9722d38264d272, type: 3} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_FlipX: 0 + m_FlipY: 0 + m_DrawMode: 0 + m_Size: {x: 1.0625, y: 2.625} + m_AdaptiveModeThreshold: 0.5 + m_SpriteTileMode: 0 + m_WasSpriteAssigned: 1 + m_MaskInteraction: 0 + m_SpriteSortPoint: 0 +--- !u!1839735485 &5555712667017248115 +Tilemap: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_Enabled: 1 + m_Tiles: {} + m_AnimatedTiles: {} + m_TileAssetArray: [] + m_TileSpriteArray: [] + m_TileMatrixArray: [] + m_TileColorArray: [] + m_TileObjectToInstantiateArray: [] + m_AnimationFrameRate: 1 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Origin: {x: 0, y: 0, z: 0} + m_Size: {x: 0, y: 0, z: 1} + m_TileAnchor: {x: 0.5, y: 0.5, z: 0} + m_TileOrientation: 0 + m_TileOrientationMatrix: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 +--- !u!95 &5555712667017248077 +Animator: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 363aef300fba71f40ab5aa64ba12659f, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!50 &5555712667017248078 +Rigidbody2D: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_BodyType: 0 + m_Simulated: 1 + m_UseFullKinematicContacts: 0 + m_UseAutoMass: 0 + m_Mass: 1 + m_LinearDrag: 0 + m_AngularDrag: 0.05 + m_GravityScale: 1 + m_Material: {fileID: 0} + m_Interpolate: 0 + m_SleepingMode: 1 + m_CollisionDetection: 0 + m_Constraints: 0 +--- !u!70 &5555712667017248079 +CapsuleCollider2D: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_Enabled: 1 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + m_Size: {x: 1.2666667, y: 3} + m_Direction: 0 +--- !u!114 &5555712667017248076 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb4a7477527c77541b25fea159d6b4c8, type: 3} + m_Name: + m_EditorClassIdentifier: + mainCamera: {fileID: 0} + acceleration: 25 + smoothing: 0.05 + gravityScale: 1.5 + jumpForce: 20 + maxJumpCount: 1 + airControl: 1 + direction: 1 + velocity: {x: 0, y: 0} + jumpCount: 0 + isGrounded: 0 + cameraPos: {x: 0, y: 0, z: 0} + _rigidBody: {fileID: 0} + _collider: {fileID: 0} + _transform: {fileID: 0} +--- !u!114 &-784960068083288243 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5555712667017248113} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4ddff3a67736d7a42a22a7590fc5b028, type: 3} + m_Name: + m_EditorClassIdentifier: + hook: {fileID: 5459487145348792490, guid: c5636787c9fa65743baae65d7537d65c, type: 3} + ropeExists: 0 diff --git a/Assets/Prefabs/Player.prefab.meta b/Assets/Prefabs/Player.prefab.meta new file mode 100644 index 0000000..677aaee --- /dev/null +++ b/Assets/Prefabs/Player.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b2169aaeb9a0e4542b1fb9d601bcc4b2 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Jungle.unity b/Assets/Scenes/Jungle.unity index 6dd6492..00a8dac 100644 --- a/Assets/Scenes/Jungle.unity +++ b/Assets/Scenes/Jungle.unity @@ -1251,6 +1251,67 @@ Grid: m_CellGap: {x: 0, y: 0, z: 0} m_CellLayout: 0 m_CellSwizzle: 0 +--- !u!1001 &1016973329 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 5555712667017248076, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: mainCamera + value: + objectReference: {fileID: 519420031} + - target: {fileID: 5555712667017248113, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_Name + value: Player + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248116, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} --- !u!1 &1411065714 GameObject: m_ObjectHideFlags: 0 @@ -1388,210 +1449,6 @@ Tilemap: e31: 0 e32: 0 e33: 1 ---- !u!1 &1517811032 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1517811037} - - component: {fileID: 1517811036} - - component: {fileID: 1517811034} - - component: {fileID: 1517811044} - - component: {fileID: 1517811047} - - component: {fileID: 1517811046} - - component: {fileID: 1517811045} - m_Layer: 0 - m_Name: Player - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!1839735485 &1517811034 -Tilemap: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517811032} - m_Enabled: 1 - m_Tiles: {} - m_AnimatedTiles: {} - m_TileAssetArray: [] - m_TileSpriteArray: [] - m_TileMatrixArray: [] - m_TileColorArray: [] - m_TileObjectToInstantiateArray: [] - m_AnimationFrameRate: 1 - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_Origin: {x: 0, y: 0, z: 0} - m_Size: {x: 0, y: 0, z: 1} - m_TileAnchor: {x: 0.5, y: 0.5, z: 0} - m_TileOrientation: 0 - m_TileOrientationMatrix: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 ---- !u!212 &1517811036 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517811032} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: 0 - m_Sprite: {fileID: 2055064200, guid: 72a632f763991754fb9722d38264d272, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 1.0625, y: 2.625} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &1517811037 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517811032} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 2, y: 2, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 1936094548} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!95 &1517811044 -Animator: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517811032} - m_Enabled: 1 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 363aef300fba71f40ab5aa64ba12659f, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_StabilizeFeet: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 ---- !u!114 &1517811045 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517811032} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: eb4a7477527c77541b25fea159d6b4c8, type: 3} - m_Name: - m_EditorClassIdentifier: - mainCamera: {fileID: 519420031} - maxSpeed: 25 - acceleration: 40 - smoothing: 0.05 - gravityScale: 1.5 - jumpForce: 20 - maxJumpCount: 1 - airControl: 1 ---- !u!70 &1517811046 -CapsuleCollider2D: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517811032} - m_Enabled: 1 - m_Density: 1 - m_Material: {fileID: 0} - m_IsTrigger: 0 - m_UsedByEffector: 0 - m_UsedByComposite: 0 - m_Offset: {x: 0, y: 0} - m_Size: {x: 1.2666667, y: 3} - m_Direction: 0 ---- !u!50 &1517811047 -Rigidbody2D: - serializedVersion: 4 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1517811032} - m_BodyType: 0 - m_Simulated: 1 - m_UseFullKinematicContacts: 0 - m_UseAutoMass: 0 - m_Mass: 1 - m_LinearDrag: 0 - m_AngularDrag: 0.05 - m_GravityScale: 1 - m_Material: {fileID: 0} - m_Interpolate: 0 - m_SleepingMode: 1 - m_CollisionDetection: 0 - m_Constraints: 0 --- !u!1 &1586752247 GameObject: m_ObjectHideFlags: 0 @@ -14053,7 +13910,7 @@ Transform: - {fileID: 544966462} - {fileID: 1742717045} m_Father: {fileID: 1936094548} - m_RootOrder: 1 + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!156049354 &1895591920 Grid: @@ -14096,7 +13953,6 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 1517811037} - {fileID: 1895591919} m_Father: {fileID: 142095922} m_RootOrder: 4 diff --git a/Assets/Scripts/RopePrototype.cs b/Assets/Scripts/RopePrototype.cs new file mode 100644 index 0000000..84d6a18 --- /dev/null +++ b/Assets/Scripts/RopePrototype.cs @@ -0,0 +1,45 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class RopePrototype : MonoBehaviour +{ + public GameObject player; + public LineRenderer lr; + public DistanceJoint2D dj; + + bool ropeCreated = false; + + // Start is called before the first frame update + void Start() + { + player = GameObject.FindGameObjectWithTag("Player"); + dj = GetComponent(); + lr = GetComponent(); + lr.positionCount = 2; + lr.SetPosition(0, transform.position); + } + + // Update is called once per frame + void Update() + { + if (!ropeCreated) + { + CreateRope(); + ropeCreated = true; + } + + RenderLine(); + } + + void RenderLine() + { + lr.SetPosition(1, player.transform.position); + } + + void CreateRope() + { + dj.connectedBody = player.GetComponent(); + dj.maxDistanceOnly = true; + } +} diff --git a/Assets/Scripts/RopePrototype.cs.meta b/Assets/Scripts/RopePrototype.cs.meta new file mode 100644 index 0000000..4ce3825 --- /dev/null +++ b/Assets/Scripts/RopePrototype.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f828efbe27e65524c9d7e0d87b6a6f0f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/RopeThrowPrototype.cs b/Assets/Scripts/RopeThrowPrototype.cs new file mode 100644 index 0000000..d828cca --- /dev/null +++ b/Assets/Scripts/RopeThrowPrototype.cs @@ -0,0 +1,37 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class RopeThrowPrototype : MonoBehaviour +{ + public GameObject hook; + public bool ropeExists = false; + + GameObject currentHook; + + // Start is called before the first frame update + void Start() + { + + } + + // Update is called once per frame + void Update() + { + if (Input.GetMouseButtonDown(0)) + { + if (!ropeExists) + { + Vector2 clickLocation = Camera.main.ScreenToWorldPoint(Input.mousePosition); + + currentHook = (GameObject)Instantiate(hook, clickLocation, Quaternion.identity); + ropeExists = true; + } + else + { + Destroy(currentHook); + ropeExists = false; + } + } + } +} diff --git a/Assets/Scripts/RopeThrowPrototype.cs.meta b/Assets/Scripts/RopeThrowPrototype.cs.meta new file mode 100644 index 0000000..3fccef5 --- /dev/null +++ b/Assets/Scripts/RopeThrowPrototype.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ddff3a67736d7a42a22a7590fc5b028 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- cgit v1.2.3-70-g09d2 From 3565b47fd64778fc7be630aea89fcd99d1907a07 Mon Sep 17 00:00:00 2001 From: Neil Kollack Date: Sun, 10 Apr 2022 17:53:36 -0500 Subject: wip: LineRenderer updated via pseudophysics --- Assets/Animations/MontanaJohns.meta | 8 + .../MontanaJohns/MontanaJohns.controller | 72 +++ .../MontanaJohns/MontanaJohns.controller.meta | 8 + Assets/Animations/MontanaJohns/Player.controller | 72 +++ .../Animations/MontanaJohns/Player.controller.meta | 8 + Assets/Animations/MontanaJohns/run.anim | 89 ++++ Assets/Animations/MontanaJohns/run.anim.meta | 8 + Assets/Animations/Prototype/Run.anim | 4 +- Assets/Prefabs/Hook.prefab | 12 +- Assets/Prefabs/Player.prefab | 4 +- Assets/Scenes/Jungle.unity | 44 +- Assets/Scripts/RopePrototype.cs | 106 +++- Assets/Sprites/Player/MontanaJohns.meta | 8 + .../MontanaJohns/MontanaJohnsLandingPreRun.png | Bin 0 -> 8337 bytes .../MontanaJohnsLandingPreRun.png.meta | 540 +++++++++++++++++++++ ProjectSettings/QualitySettings.asset | 1 + 16 files changed, 967 insertions(+), 17 deletions(-) create mode 100644 Assets/Animations/MontanaJohns.meta create mode 100644 Assets/Animations/MontanaJohns/MontanaJohns.controller create mode 100644 Assets/Animations/MontanaJohns/MontanaJohns.controller.meta create mode 100644 Assets/Animations/MontanaJohns/Player.controller create mode 100644 Assets/Animations/MontanaJohns/Player.controller.meta create mode 100644 Assets/Animations/MontanaJohns/run.anim create mode 100644 Assets/Animations/MontanaJohns/run.anim.meta create mode 100644 Assets/Sprites/Player/MontanaJohns.meta create mode 100644 Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png create mode 100644 Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png.meta diff --git a/Assets/Animations/MontanaJohns.meta b/Assets/Animations/MontanaJohns.meta new file mode 100644 index 0000000..6005515 --- /dev/null +++ b/Assets/Animations/MontanaJohns.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 266df54c1e6640943b5549c0a60fbc37 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MontanaJohns/MontanaJohns.controller b/Assets/Animations/MontanaJohns/MontanaJohns.controller new file mode 100644 index 0000000..cfb8eec --- /dev/null +++ b/Assets/Animations/MontanaJohns/MontanaJohns.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-4381722352777846568 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Run + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 16f0d19faa73a274788329f7368084f1, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: MontanaJohns + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 830988249226544064} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1107 &830988249226544064 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -4381722352777846568} + m_Position: {x: 380, y: 120, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -4381722352777846568} diff --git a/Assets/Animations/MontanaJohns/MontanaJohns.controller.meta b/Assets/Animations/MontanaJohns/MontanaJohns.controller.meta new file mode 100644 index 0000000..d38ee98 --- /dev/null +++ b/Assets/Animations/MontanaJohns/MontanaJohns.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5b3446f9fca03924ea2739d6e2d1f00e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MontanaJohns/Player.controller b/Assets/Animations/MontanaJohns/Player.controller new file mode 100644 index 0000000..4d4a73d --- /dev/null +++ b/Assets/Animations/MontanaJohns/Player.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1107 &-989215695225172247 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -45171433127652272} + m_Position: {x: 330, y: 110, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -45171433127652272} +--- !u!1102 &-45171433127652272 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: run + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 16f0d19faa73a274788329f7368084f1, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Player + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: -989215695225172247} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} diff --git a/Assets/Animations/MontanaJohns/Player.controller.meta b/Assets/Animations/MontanaJohns/Player.controller.meta new file mode 100644 index 0000000..ff283bc --- /dev/null +++ b/Assets/Animations/MontanaJohns/Player.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8ece3251730e7134f9bbe0852b7c6612 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/MontanaJohns/run.anim b/Assets/Animations/MontanaJohns/run.anim new file mode 100644 index 0000000..fdce640 --- /dev/null +++ b/Assets/Animations/MontanaJohns/run.anim @@ -0,0 +1,89 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: run + serializedVersion: 6 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: [] + m_PPtrCurves: + - curve: + - time: 0 + value: {fileID: 1256470140, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - time: 0.083333336 + value: {fileID: -1042349849, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - time: 0.16666667 + value: {fileID: 216792634, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - time: 0.25 + value: {fileID: 1044303231, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - time: 0.33333334 + value: {fileID: 299380834, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - time: 0.41666666 + value: {fileID: -1460522098, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - time: 0.5 + value: {fileID: -1969183652, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - time: 0.5833333 + value: {fileID: -919123645, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + attribute: m_Sprite + path: + classID: 212 + script: {fileID: 0} + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 0 + attribute: 0 + script: {fileID: 0} + typeID: 212 + customType: 23 + isPPtrCurve: 1 + pptrCurveMapping: + - {fileID: 1256470140, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - {fileID: -1042349849, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - {fileID: 216792634, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - {fileID: 1044303231, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - {fileID: 299380834, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - {fileID: -1460522098, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - {fileID: -1969183652, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + - {fileID: -919123645, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 0.59999996 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 1 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: [] + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/Animations/MontanaJohns/run.anim.meta b/Assets/Animations/MontanaJohns/run.anim.meta new file mode 100644 index 0000000..ec1c104 --- /dev/null +++ b/Assets/Animations/MontanaJohns/run.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 16f0d19faa73a274788329f7368084f1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Prototype/Run.anim b/Assets/Animations/Prototype/Run.anim index 7183182..bb7d17d 100644 --- a/Assets/Animations/Prototype/Run.anim +++ b/Assets/Animations/Prototype/Run.anim @@ -20,7 +20,7 @@ AnimationClip: m_PPtrCurves: - curve: - time: 0 - value: {fileID: -560681948, guid: 72a632f763991754fb9722d38264d272, type: 3} + value: {fileID: 927410543, guid: 72a632f763991754fb9722d38264d272, type: 3} - time: 0.083333336 value: {fileID: 927410543, guid: 72a632f763991754fb9722d38264d272, type: 3} - time: 0.16666667 @@ -54,7 +54,7 @@ AnimationClip: customType: 23 isPPtrCurve: 1 pptrCurveMapping: - - {fileID: -560681948, guid: 72a632f763991754fb9722d38264d272, type: 3} + - {fileID: 927410543, guid: 72a632f763991754fb9722d38264d272, type: 3} - {fileID: 927410543, guid: 72a632f763991754fb9722d38264d272, type: 3} - {fileID: -1632938849, guid: 72a632f763991754fb9722d38264d272, type: 3} - {fileID: -774491187, guid: 72a632f763991754fb9722d38264d272, type: 3} diff --git a/Assets/Prefabs/Hook.prefab b/Assets/Prefabs/Hook.prefab index 07111ea..434a3ee 100644 --- a/Assets/Prefabs/Hook.prefab +++ b/Assets/Prefabs/Hook.prefab @@ -105,7 +105,7 @@ Rigidbody2D: m_AngularDrag: 0.05 m_GravityScale: 1 m_Material: {fileID: 0} - m_Interpolate: 0 + m_Interpolate: 1 m_SleepingMode: 1 m_CollisionDetection: 0 m_Constraints: 0 @@ -125,7 +125,7 @@ DistanceJoint2D: m_AutoConfigureConnectedAnchor: 0 m_Anchor: {x: 0, y: 0} m_ConnectedAnchor: {x: 0, y: 0} - m_AutoConfigureDistance: 1 + m_AutoConfigureDistance: 0 m_Distance: 6 m_MaxDistanceOnly: 0 --- !u!114 &-2244153933399610223 @@ -140,9 +140,11 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f828efbe27e65524c9d7e0d87b6a6f0f, type: 3} m_Name: m_EditorClassIdentifier: - player: {fileID: 0} - lr: {fileID: 0} - dj: {fileID: 0} + constraintIterations: 50 + gravityMultiplier: 1 + lineWidth: 0.2 + ropeSegmentLength: 0.25 + segmentCount: 35 --- !u!120 &-1471091967506001749 LineRenderer: m_ObjectHideFlags: 0 diff --git a/Assets/Prefabs/Player.prefab b/Assets/Prefabs/Player.prefab index 7d1fc4c..a93411e 100644 --- a/Assets/Prefabs/Player.prefab +++ b/Assets/Prefabs/Player.prefab @@ -79,7 +79,7 @@ SpriteRenderer: m_SortingLayerID: 0 m_SortingLayer: 0 m_SortingOrder: 0 - m_Sprite: {fileID: 2055064200, guid: 72a632f763991754fb9722d38264d272, type: 3} + m_Sprite: {fileID: 1409862686, guid: 8b08bada3c2ac5e4cb65721a772f0f99, type: 3} m_Color: {r: 1, g: 1, b: 1, a: 1} m_FlipX: 0 m_FlipY: 0 @@ -165,7 +165,7 @@ Rigidbody2D: m_AngularDrag: 0.05 m_GravityScale: 1 m_Material: {fileID: 0} - m_Interpolate: 0 + m_Interpolate: 1 m_SleepingMode: 1 m_CollisionDetection: 0 m_Constraints: 0 diff --git a/Assets/Scenes/Jungle.unity b/Assets/Scenes/Jungle.unity index 00a8dac..bfc0e65 100644 --- a/Assets/Scenes/Jungle.unity +++ b/Assets/Scenes/Jungle.unity @@ -1262,6 +1262,22 @@ PrefabInstance: propertyPath: mainCamera value: objectReference: {fileID: 519420031} + - target: {fileID: 5555712667017248079, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_Size.x + value: 1.2 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248079, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_Size.y + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248079, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_Offset.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5555712667017248079, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + propertyPath: m_Offset.y + value: -1 + objectReference: {fileID: 0} - target: {fileID: 5555712667017248113, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} propertyPath: m_Name value: Player @@ -1310,7 +1326,8 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} - m_RemovedComponents: [] + m_RemovedComponents: + - {fileID: 5555712667017248077, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} m_SourcePrefab: {fileID: 100100000, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} --- !u!1 &1411065714 GameObject: @@ -14191,6 +14208,31 @@ Tilemap: e31: 0 e32: 0 e33: 1 +--- !u!1 &2005986189 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5555712667017248113, guid: b2169aaeb9a0e4542b1fb9d601bcc4b2, type: 3} + m_PrefabInstance: {fileID: 1016973329} + m_PrefabAsset: {fileID: 0} +--- !u!95 &2005986198 +Animator: + serializedVersion: 4 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2005986189} + m_Enabled: 1 + m_Avatar: {fileID: 0} + m_Controller: {fileID: 9100000, guid: 5b3446f9fca03924ea2739d6e2d1f00e, type: 2} + m_CullingMode: 0 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_StabilizeFeet: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 + m_KeepAnimatorControllerStateOnDisable: 0 --- !u!1 &2132358794 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/RopePrototype.cs b/Assets/Scripts/RopePrototype.cs index 84d6a18..d1aca32 100644 --- a/Assets/Scripts/RopePrototype.cs +++ b/Assets/Scripts/RopePrototype.cs @@ -4,10 +4,17 @@ using UnityEngine; public class RopePrototype : MonoBehaviour { - public GameObject player; - public LineRenderer lr; - public DistanceJoint2D dj; + public int constraintIterations = 50; + public float gravityMultiplier = 1.0f; + public float lineWidth = 0.1f; + public float ropeSegmentLength = 0.25f; + public int segmentCount = 35; + LineRenderer lr; + DistanceJoint2D dj; + GameObject player; + List ropeSegments = new List(); + Vector3[] ropePositions; bool ropeCreated = false; // Start is called before the first frame update @@ -16,8 +23,17 @@ public class RopePrototype : MonoBehaviour player = GameObject.FindGameObjectWithTag("Player"); dj = GetComponent(); lr = GetComponent(); - lr.positionCount = 2; - lr.SetPosition(0, transform.position); + lr.startWidth = lineWidth; + lr.endWidth = lineWidth; + ropePositions = new Vector3[segmentCount]; + lr.positionCount = segmentCount; + Vector2 ropeLoc = transform.position; + + for (int i = 0; i < segmentCount; i++) + { + ropeSegments.Add(new RopeSegment(ropeLoc)); + ropeLoc.y -= ropeSegmentLength; + } } // Update is called once per frame @@ -28,18 +44,94 @@ public class RopePrototype : MonoBehaviour CreateRope(); ropeCreated = true; } - RenderLine(); } + void FixedUpdate() + { + Simulate(); + } + void RenderLine() { - lr.SetPosition(1, player.transform.position); + for(int i = 0; i < ropePositions.Length; i++) + { + ropePositions[i] = ropeSegments[i].posNow; + } + lr.SetPositions(ropePositions); } void CreateRope() { dj.connectedBody = player.GetComponent(); dj.maxDistanceOnly = true; + dj.distance = Vector2.Distance(player.transform.position, transform.position); + } + + void Simulate() + { + Vector2 gravityForce = new Vector2(0f, -gravityMultiplier); + + for(int i = 0; i < ropeSegments.Count; i++) + { + RopeSegment segment = ropeSegments[i]; + Vector2 velocity = segment.posNow - segment.posOld; + segment.posOld = segment.posNow; + segment.posNow += velocity; + segment.posNow += gravityForce * Time.deltaTime; + ropeSegments[i] = segment; + } + + for(int i = 0; i < constraintIterations; i++) + { + ApplyContraint(); + } + } + + void ApplyContraint() + { + RopeSegment endSegment1 = ropeSegments[0]; + endSegment1.posNow = transform.position; + ropeSegments[0] = endSegment1; + + RopeSegment endSegment2 = ropeSegments[ropeSegments.Count - 1]; + endSegment2.posNow = player.transform.position; + ropeSegments[ropeSegments.Count - 1] = endSegment2; + + for (int i = 0; i < ropeSegments.Count-1; i++) + { + RopeSegment segment1 = ropeSegments[i]; + RopeSegment segment2 = ropeSegments[i + 1]; + + float distance = (segment1.posNow - segment2.posNow).magnitude; + float error = distance - ropeSegmentLength; + Vector2 normalChange = (segment1.posNow - segment2.posNow).normalized; + Vector2 change = normalChange * error; + + if(i != 0) + { + segment1.posNow -= change * 0.5f; + ropeSegments[i] = segment1; + segment2.posNow += change * 0.5f; + ropeSegments[i + 1] = segment2; + } + else + { + segment2.posNow += change; + ropeSegments[i + 1] = segment2; + } + } + } + + public struct RopeSegment + { + public Vector2 posNow; + public Vector2 posOld; + + public RopeSegment(Vector2 pos) + { + this.posNow = pos; + this.posOld = pos; + } } } diff --git a/Assets/Sprites/Player/MontanaJohns.meta b/Assets/Sprites/Player/MontanaJohns.meta new file mode 100644 index 0000000..ad73076 --- /dev/null +++ b/Assets/Sprites/Player/MontanaJohns.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8e372a4df912a04459307549abb0b986 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png b/Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png new file mode 100644 index 0000000..053e559 Binary files /dev/null and b/Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png differ diff --git a/Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png.meta b/Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png.meta new file mode 100644 index 0000000..612054a --- /dev/null +++ b/Assets/Sprites/Player/MontanaJohns/MontanaJohnsLandingPreRun.png.meta @@ -0,0 +1,540 @@ +fileFormatVersion: 2 +guid: 8b08bada3c2ac5e4cb65721a772f0f99 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 11 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMasterTextureLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 0 + aniso: 1 + mipBias: 0 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 2 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 16 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_0 + rect: + serializedVersion: 2 + x: 0 + y: 161 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 7bd20026429302b4f937a2692191c495 + internalID: 1409862686 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_1 + rect: + serializedVersion: 2 + x: 600 + y: 161 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: effcf0774b53f794caaba2f4a25fefde + internalID: -161029916 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_2 + rect: + serializedVersion: 2 + x: 700 + y: 161 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: cea18626120fc1f4292393ab1b9db7bc + internalID: 1526622238 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_3 + rect: + serializedVersion: 2 + x: 0 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 01583759aca17564d9fc8d4ff7739e5d + internalID: 1256470140 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_4 + rect: + serializedVersion: 2 + x: 100 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 0cd0bfa24ca666a4fbd0b6bf86e08006 + internalID: -1042349849 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_5 + rect: + serializedVersion: 2 + x: 200 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 41cb4bb666edbed458752a2d9c9efca5 + internalID: 216792634 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_6 + rect: + serializedVersion: 2 + x: 300 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: e699e612a35ab064497869f077043622 + internalID: 1044303231 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_7 + rect: + serializedVersion: 2 + x: 400 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 8a46b9feb095f004487e87775afda903 + internalID: 299380834 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_8 + rect: + serializedVersion: 2 + x: 500 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 4f3f1c6c143762440a0c10e53c172020 + internalID: -1460522098 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_9 + rect: + serializedVersion: 2 + x: 600 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: f30d885d1fdb7474db05bb3b764f1ba8 + internalID: -1969183652 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_10 + rect: + serializedVersion: 2 + x: 700 + y: 81 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 1d51541ab5f6f8940b0f3e8056ffe79d + internalID: -919123645 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_11 + rect: + serializedVersion: 2 + x: 0 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 43f865f05c5f5384a9daaeb32a715139 + internalID: 508543913 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_12 + rect: + serializedVersion: 2 + x: 100 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: ecaf43ea5c36c6044948c16c538bd36e + internalID: -1075184750 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_13 + rect: + serializedVersion: 2 + x: 200 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 6d2c31700201c1440a2cf85c982a7f4d + internalID: -1586354681 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_14 + rect: + serializedVersion: 2 + x: 300 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 31016fa388aa3e749aa728060781af95 + internalID: 195716706 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_15 + rect: + serializedVersion: 2 + x: 400 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 40fcb2fd58e40114795f3f152086fa19 + internalID: -1728902432 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_16 + rect: + serializedVersion: 2 + x: 500 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: b1f2520e2a7ca7e419983e0c1794028c + internalID: 470777305 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_17 + rect: + serializedVersion: 2 + x: 600 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: de95cc37b62efea4791b4ccdaf19ebfd + internalID: 37177715 + vertices: [] + indices: + edges: [] + weights: [] + - serializedVersion: 2 + name: MontanaJohnsLandingPreRun_18 + rect: + serializedVersion: 2 + x: 700 + y: 1 + width: 100 + height: 79 + alignment: 0 + pivot: {x: 0, y: 0} + border: {x: 0, y: 0, z: 0, w: 0} + outline: [] + physicsShape: [] + tessellationDetail: 0 + bones: [] + spriteID: 5385afbc0fa433b40a09e33920d01f38 + internalID: -1727536245 + vertices: [] + indices: + edges: [] + weights: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 5e97eb03825dee720800000000000000 + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: + MontanaJohnsLandingPreRun_8: -1460522098 + MontanaJohnsLandingPreRun_14: 195716706 + MontanaJohnsLandingPreRun_3: 1256470140 + MontanaJohnsLandingPreRun_5: 216792634 + MontanaJohnsLandingPreRun_16: 470777305 + MontanaJohnsLandingPreRun_11: 508543913 + MontanaJohnsLandingPreRun_0: 1409862686 + MontanaJohnsLandingPreRun_1: -161029916 + MontanaJohnsLandingPreRun_10: -919123645 + MontanaJohnsLandingPreRun_15: -1728902432 + MontanaJohnsLandingPreRun_7: 299380834 + MontanaJohnsLandingPreRun_4: -1042349849 + MontanaJohnsLandingPreRun_12: -1075184750 + MontanaJohnsLandingPreRun_2: 1526622238 + MontanaJohnsLandingPreRun_13: -1586354681 + MontanaJohnsLandingPreRun_18: -1727536245 + MontanaJohnsLandingPreRun_6: 1044303231 + MontanaJohnsLandingPreRun_9: -1969183652 + MontanaJohnsLandingPreRun_17: 37177715 + spritePackingTag: + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/QualitySettings.asset b/ProjectSettings/QualitySettings.asset index d24eb10..7bbcf0f 100644 --- a/ProjectSettings/QualitySettings.asset +++ b/ProjectSettings/QualitySettings.asset @@ -227,6 +227,7 @@ QualitySettings: Lumin: 5 Nintendo Switch: 5 PS4: 5 + Server: 0 Stadia: 5 Standalone: 5 WebGL: 3 -- cgit v1.2.3-70-g09d2 From 6fa2ddb45554b9a236e2d2909ae30fb2c2df9a31 Mon Sep 17 00:00:00 2001 From: Neil Kollack Date: Sun, 10 Apr 2022 18:46:28 -0500 Subject: fix: rope jittery-ness --- Assets/Prefabs/Hook.prefab | 4 ++-- Assets/Scripts/RopePrototype.cs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/Prefabs/Hook.prefab b/Assets/Prefabs/Hook.prefab index 434a3ee..0728e6b 100644 --- a/Assets/Prefabs/Hook.prefab +++ b/Assets/Prefabs/Hook.prefab @@ -140,10 +140,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: f828efbe27e65524c9d7e0d87b6a6f0f, type: 3} m_Name: m_EditorClassIdentifier: - constraintIterations: 50 + constraintIterations: 15 gravityMultiplier: 1 lineWidth: 0.2 - ropeSegmentLength: 0.25 + ropeSegmentLength: 0.2 segmentCount: 35 --- !u!120 &-1471091967506001749 LineRenderer: diff --git a/Assets/Scripts/RopePrototype.cs b/Assets/Scripts/RopePrototype.cs index d1aca32..901a3d3 100644 --- a/Assets/Scripts/RopePrototype.cs +++ b/Assets/Scripts/RopePrototype.cs @@ -45,11 +45,12 @@ public class RopePrototype : MonoBehaviour ropeCreated = true; } RenderLine(); + Simulate(); } void FixedUpdate() { - Simulate(); + } void RenderLine() -- cgit v1.2.3-70-g09d2 From 92c76d6d42512953c80e4250344f6694d9c4de56 Mon Sep 17 00:00:00 2001 From: Neil Kollack Date: Sun, 10 Apr 2022 18:50:43 -0500 Subject: chore: code cleanup --- Assets/Scripts/RopePrototype.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Assets/Scripts/RopePrototype.cs b/Assets/Scripts/RopePrototype.cs index 901a3d3..b2f37ab 100644 --- a/Assets/Scripts/RopePrototype.cs +++ b/Assets/Scripts/RopePrototype.cs @@ -48,11 +48,6 @@ public class RopePrototype : MonoBehaviour Simulate(); } - void FixedUpdate() - { - - } - void RenderLine() { for(int i = 0; i < ropePositions.Length; i++) -- cgit v1.2.3-70-g09d2