From e22b8f8cc24dc9803998e1d7f60b631995932cfe Mon Sep 17 00:00:00 2001 From: MarcoHampel Date: Thu, 8 Feb 2024 14:47:03 -0500 Subject: [PATCH] Massively reduced model sizes --- Assets/Animations/Monters/SpeedyLaser.meta | 8 + .../Monster_SpeedyAnimator.controller | 72 +++++ .../Monster_SpeedyAnimator.controller.meta | 8 + .../AlienMats/Flesh_graph_0/Flesh2.mat | 268 ++++++++++++++++++ .../AlienMats/Flesh_graph_0/Flesh2.mat.meta | 8 + Assets/Models/Aliens/BaseAlien_Skinned.fbx | 4 +- Assets/Models/Aliens/Flesh2.meta | 8 + .../Aliens/Flesh2/SpeedySpiderMonster.fbx | 3 + .../{ => Flesh2}/SpeedySpiderMonster.fbx.meta | 2 +- Assets/Models/Aliens/SpeedySpiderMonster.fbx | 3 - ...stronaut_with_skeleton_updated_no_feet.fbx | 4 +- .../EnemyExperimentation1.unity | 209 ++++++++++++-- Assets/Scripts/Enemies/SpeedyMonster.meta | 8 + .../SpeedyMonster/Speedy_IKTargeting.cs | 45 +++ .../SpeedyMonster/Speedy_IKTargeting.cs.meta | 11 + 15 files changed, 635 insertions(+), 26 deletions(-) create mode 100644 Assets/Animations/Monters/SpeedyLaser.meta create mode 100644 Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller create mode 100644 Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller.meta create mode 100644 Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat create mode 100644 Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat.meta create mode 100644 Assets/Models/Aliens/Flesh2.meta create mode 100644 Assets/Models/Aliens/Flesh2/SpeedySpiderMonster.fbx rename Assets/Models/Aliens/{ => Flesh2}/SpeedySpiderMonster.fbx.meta (99%) delete mode 100644 Assets/Models/Aliens/SpeedySpiderMonster.fbx create mode 100644 Assets/Scripts/Enemies/SpeedyMonster.meta create mode 100644 Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs create mode 100644 Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs.meta diff --git a/Assets/Animations/Monters/SpeedyLaser.meta b/Assets/Animations/Monters/SpeedyLaser.meta new file mode 100644 index 0000000..4c47279 --- /dev/null +++ b/Assets/Animations/Monters/SpeedyLaser.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7da84faa856063f4ca43918d1c55379d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller b/Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller new file mode 100644 index 0000000..c7de403 --- /dev/null +++ b/Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-5383973321885538212 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Idle + 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: 0} + 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: Monster_SpeedyAnimator + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 968194220900944156} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 1 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1107 &968194220900944156 +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: -5383973321885538212} + m_Position: {x: 320, y: 100, 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: -5383973321885538212} diff --git a/Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller.meta b/Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller.meta new file mode 100644 index 0000000..48dcdbb --- /dev/null +++ b/Assets/Animations/Monters/SpeedyLaser/Monster_SpeedyAnimator.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 51e21f7f50629d640875eea7173918fc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat b/Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat new file mode 100644 index 0000000..f89250d --- /dev/null +++ b/Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat @@ -0,0 +1,268 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &-3911490288804452093 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 12 + hdPluginSubTargetMaterialVersions: + m_Keys: [] + m_Values: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Flesh2 + m_Shader: {fileID: 4800000, guid: 6e4ae4064600d784cac1e41a9e6f2e59, type: 3} + m_ValidKeywords: + - _DISABLE_SSR_TRANSPARENT + - _MASKMAP + - _NORMALMAP + - _NORMALMAP_TANGENT_SPACE + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 2225 + stringTagMap: {} + disabledShaderPasses: + - TransparentDepthPrepass + - TransparentDepthPostpass + - TransparentBackface + - RayTracingPrepass + - MOTIONVECTORS + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _AnisotropyMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BaseColorMap: + m_Texture: {fileID: 2800000, guid: 0cefa7db3d7a62e428665fca9cc12e35, type: 3} + m_Scale: {x: 4, y: 4} + m_Offset: {x: 0, y: 0} + - _BentNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BentNormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _CoatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissiveColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _HeightMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _IridescenceThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 2800000, guid: 0cefa7db3d7a62e428665fca9cc12e35, type: 3} + m_Scale: {x: 4, y: 4} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 2800000, guid: 14e44008a6d94d84d9f6d485e5751983, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 2800000, guid: 9c872e4dd3b884c439d8e76efc965f7b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecularColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SubsurfaceMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TangentMapOS: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ThicknessMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _TransmittanceColorMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AORemapMax: 1 + - _AORemapMin: 0 + - _ATDistance: 1 + - _AddPrecomputedVelocity: 0 + - _AlbedoAffectEmissive: 0 + - _AlphaCutoff: 0.5 + - _AlphaCutoffEnable: 0 + - _AlphaCutoffPostpass: 0.5 + - _AlphaCutoffPrepass: 0.5 + - _AlphaCutoffShadow: 0.5 + - _AlphaDstBlend: 0 + - _AlphaSrcBlend: 1 + - _AlphaToMask: 0 + - _AlphaToMaskInspectorValue: 0 + - _Anisotropy: 0 + - _BlendMode: 0 + - _CoatMask: 0 + - _CullMode: 2 + - _CullModeForward: 2 + - _Cutoff: 0.5 + - _DepthOffsetEnable: 0 + - _DetailAlbedoScale: 1 + - _DetailNormalScale: 1 + - _DetailSmoothnessScale: 1 + - _DiffusionProfile: 0 + - _DiffusionProfileHash: 0 + - _DisplacementLockObjectScale: 1 + - _DisplacementLockTilingScale: 1 + - _DisplacementMode: 0 + - _DoubleSidedEnable: 0 + - _DoubleSidedGIMode: 0 + - _DoubleSidedNormalMode: 1 + - _DstBlend: 0 + - _EmissiveColorMode: 1 + - _EmissiveExposureWeight: 1 + - _EmissiveIntensity: 1 + - _EmissiveIntensityUnit: 0 + - _EnableBlendModePreserveSpecularLighting: 1 + - _EnableFogOnTransparent: 1 + - _EnableGeometricSpecularAA: 0 + - _EnergyConservingSpecularColor: 1 + - _HeightAmplitude: 0.02 + - _HeightCenter: 0.5 + - _HeightMapParametrization: 0 + - _HeightMax: 1 + - _HeightMin: -1 + - _HeightOffset: 0 + - _HeightPoMAmplitude: 2 + - _HeightTessAmplitude: 2 + - _HeightTessCenter: 0.5 + - _InvTilingScale: 0.25 + - _Ior: 1.5 + - _IridescenceMask: 1 + - _IridescenceThickness: 1 + - _LinkDetailsWithBase: 1 + - _MaterialID: 1 + - _Metallic: 0 + - _MetallicRemapMax: 1 + - _MetallicRemapMin: 0 + - _NormalMapSpace: 0 + - _NormalScale: 0.8 + - _OpaqueCullMode: 2 + - _PPDLodThreshold: 5 + - _PPDMaxSamples: 15 + - _PPDMinSamples: 5 + - _PPDPrimitiveLength: 1 + - _PPDPrimitiveWidth: 1 + - _RayTracing: 0 + - _ReceivesSSR: 1 + - _ReceivesSSRTransparent: 0 + - _RefractionModel: 0 + - _Smoothness: 0.5 + - _SmoothnessRemapMax: 1 + - _SmoothnessRemapMin: 0 + - _SpecularAAScreenSpaceVariance: 0.1 + - _SpecularAAThreshold: 0.2 + - _SpecularOcclusionMode: 1 + - _SrcBlend: 1 + - _StencilRef: 0 + - _StencilRefDepth: 8 + - _StencilRefGBuffer: 10 + - _StencilRefMV: 40 + - _StencilWriteMask: 6 + - _StencilWriteMaskDepth: 8 + - _StencilWriteMaskGBuffer: 14 + - _StencilWriteMaskMV: 40 + - _SubsurfaceMask: 1 + - _SupportDecals: 1 + - _SurfaceType: 0 + - _TexWorldScale: 1 + - _TexWorldScaleEmissive: 1 + - _Thickness: 1 + - _TransmissionEnable: 1 + - _TransparentBackfaceEnable: 0 + - _TransparentCullMode: 2 + - _TransparentDepthPostpassEnable: 0 + - _TransparentDepthPrepassEnable: 0 + - _TransparentSortPriority: 0 + - _TransparentWritingMotionVec: 0 + - _TransparentZWrite: 0 + - _UVBase: 0 + - _UVDetail: 0 + - _UVEmissive: 0 + - _UseEmissiveIntensity: 0 + - _UseShadowThreshold: 0 + - _ZTestDepthEqualForOpaque: 3 + - _ZTestGBuffer: 4 + - _ZTestTransparent: 4 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 0.91111267, b: 0, a: 1} + - _BaseColorMap_MipInfo: {r: 0, g: 0, b: 0, a: 0} + - _Color: {r: 1, g: 0.91111267, b: 0, a: 1} + - _DiffusionProfileAsset: {r: 0, g: 0, b: 0, a: 0} + - _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _EmissiveColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissiveColorLDR: {r: 0, g: 0, b: 0, a: 1} + - _InvPrimScale: {r: 1, g: 1, b: 0, a: 0} + - _IridescenceThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} + - _ThicknessRemap: {r: 0, g: 1, b: 0, a: 0} + - _TransmittanceColor: {r: 1, g: 1, b: 1, a: 1} + - _UVDetailsMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMask: {r: 1, g: 0, b: 0, a: 0} + - _UVMappingMaskEmissive: {r: 1, g: 0, b: 0, a: 0} + m_BuildTextureStacks: [] diff --git a/Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat.meta b/Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat.meta new file mode 100644 index 0000000..b06bf4f --- /dev/null +++ b/Assets/Materials/AlienMats/Flesh_graph_0/Flesh2.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 36bbb425cf6fefc4fa259856e7ee21df +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Aliens/BaseAlien_Skinned.fbx b/Assets/Models/Aliens/BaseAlien_Skinned.fbx index 7d580b6..9fbe3b5 100644 --- a/Assets/Models/Aliens/BaseAlien_Skinned.fbx +++ b/Assets/Models/Aliens/BaseAlien_Skinned.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e880a9e250e2ffaf29d7fb2fd5b74e288fb085fc3c2ae576c3c70b3a20430a9e -size 22542684 +oid sha256:1a327ad4b7f496b7e04d1c09a5bcfeed81fb471a064f8f0cb9c38d44e9f57d36 +size 2269436 diff --git a/Assets/Models/Aliens/Flesh2.meta b/Assets/Models/Aliens/Flesh2.meta new file mode 100644 index 0000000..408ee6e --- /dev/null +++ b/Assets/Models/Aliens/Flesh2.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e1b966e03cc4b2643876ec9bc447e487 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Models/Aliens/Flesh2/SpeedySpiderMonster.fbx b/Assets/Models/Aliens/Flesh2/SpeedySpiderMonster.fbx new file mode 100644 index 0000000..5291844 --- /dev/null +++ b/Assets/Models/Aliens/Flesh2/SpeedySpiderMonster.fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d25616992c6e6c0b3f62c545b9b0d2832f020925b5184e24e034f2ec09f39df +size 10119372 diff --git a/Assets/Models/Aliens/SpeedySpiderMonster.fbx.meta b/Assets/Models/Aliens/Flesh2/SpeedySpiderMonster.fbx.meta similarity index 99% rename from Assets/Models/Aliens/SpeedySpiderMonster.fbx.meta rename to Assets/Models/Aliens/Flesh2/SpeedySpiderMonster.fbx.meta index 8613b6f..9edfc59 100644 --- a/Assets/Models/Aliens/SpeedySpiderMonster.fbx.meta +++ b/Assets/Models/Aliens/Flesh2/SpeedySpiderMonster.fbx.meta @@ -97,7 +97,7 @@ ModelImporter: autoGenerateAvatarMappingIfUnspecified: 1 animationType: 2 humanoidOversampling: 1 - avatarSetup: 0 + avatarSetup: 1 addHumanoidExtraRootOnlyWhenUsingAvatar: 1 remapMaterialsIfMaterialImportModeIsNone: 0 additionalBone: 0 diff --git a/Assets/Models/Aliens/SpeedySpiderMonster.fbx b/Assets/Models/Aliens/SpeedySpiderMonster.fbx deleted file mode 100644 index c857456..0000000 --- a/Assets/Models/Aliens/SpeedySpiderMonster.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a64a915f5112d8fcc32da1636d0496a70c1ec7811473f175341d815cc1d240c3 -size 8135948 diff --git a/Assets/Models/Astronaut/Astronaut_with_skeleton_updated_no_feet.fbx b/Assets/Models/Astronaut/Astronaut_with_skeleton_updated_no_feet.fbx index 264747a..c4c6f0e 100644 --- a/Assets/Models/Astronaut/Astronaut_with_skeleton_updated_no_feet.fbx +++ b/Assets/Models/Astronaut/Astronaut_with_skeleton_updated_no_feet.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82802cc5d9d8381453fe8f22d3d021d5dabe13930a30c486031c32e72af7876a -size 85749324 +oid sha256:c7f05dd72b384b110e5be433084a054e41edb932a5eceb74c567c98fad843e25 +size 74299468 diff --git a/Assets/Scenes/Experimentation/EnemyExperimentation1.unity b/Assets/Scenes/Experimentation/EnemyExperimentation1.unity index 1bdd0cd..0a16bae 100644 --- a/Assets/Scenes/Experimentation/EnemyExperimentation1.unity +++ b/Assets/Scenes/Experimentation/EnemyExperimentation1.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_IndirectSpecularColor: {r: 2140.1504, g: 1460.8994, b: 1184.2715, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -256,7 +256,7 @@ Transform: - {fileID: 1821628117} - {fileID: 543450652357871620} m_Father: {fileID: 0} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &142648493 PrefabInstance: @@ -267,7 +267,7 @@ PrefabInstance: m_Modifications: - target: {fileID: 718690339124133420, guid: c154daaf377c39b4d89906ec77082bee, type: 3} propertyPath: m_RootOrder - value: 17 + value: 18 objectReference: {fileID: 0} - target: {fileID: 718690339124133420, guid: c154daaf377c39b4d89906ec77082bee, type: 3} propertyPath: m_LocalPosition.x @@ -408,7 +408,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!114 &144918071 MonoBehaviour: @@ -824,7 +824,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 9 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &257884400 GameObject: @@ -1074,7 +1074,7 @@ Transform: m_Children: - {fileID: 2006386676} m_Father: {fileID: 0} - m_RootOrder: 11 + m_RootOrder: 12 m_LocalEulerAnglesHint: {x: 0, y: 0, z: -44.033} --- !u!95 &326486707 Animator: @@ -1747,7 +1747,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 13 + m_RootOrder: 14 m_LocalEulerAnglesHint: {x: 44.791, y: -201.833, z: -174.741} --- !u!1 &840215355 GameObject: @@ -2062,7 +2062,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 8 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &933376773 GameObject: @@ -2159,7 +2159,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 15 + m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &935604208 GameObject: @@ -2361,7 +2361,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 14 + m_RootOrder: 15 m_LocalEulerAnglesHint: {x: 0, y: 218.31, z: 0} --- !u!114 &935604213 MonoBehaviour: @@ -2386,7 +2386,7 @@ PrefabInstance: m_Modifications: - target: {fileID: -8679921383154817045, guid: 6fa6726c37e5430458b3f7702871a8da, type: 3} propertyPath: m_RootOrder - value: 5 + value: 6 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: 6fa6726c37e5430458b3f7702871a8da, type: 3} propertyPath: m_LocalScale.x @@ -2471,7 +2471,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 1841410271473095026, guid: 89324426fa3e07540966ca8ecc69279e, type: 3} propertyPath: m_RootOrder - value: 3 + value: 4 objectReference: {fileID: 0} - target: {fileID: 1841410271473095026, guid: 89324426fa3e07540966ca8ecc69279e, type: 3} propertyPath: m_LocalPosition.x @@ -2605,7 +2605,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0.232, y: -0.028, z: -0.02} --- !u!114 &1342418930 MonoBehaviour: @@ -2625,6 +2625,103 @@ MonoBehaviour: lookObj: {fileID: 196462245} stepOnObj: {fileID: 1821628117} stepOffObj: {fileID: 145932035} +--- !u!1 &1557780297 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1557780301} + - component: {fileID: 1557780300} + - component: {fileID: 1557780299} + - component: {fileID: 1557780298} + m_Layer: 0 + m_Name: Target + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!65 &1557780298 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1557780297} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1557780299 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1557780297} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 257 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 73c176f402d2c2f4d929aa5da7585d17, 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: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1557780300 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1557780297} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1557780301 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1557780297} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -6.12, y: 0, z: -1.2419434} + m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1821628113 GameObject: m_ObjectHideFlags: 0 @@ -2786,16 +2883,92 @@ PrefabInstance: propertyPath: m_LocalEulerAnglesHint.z value: 0 objectReference: {fileID: 0} + - target: {fileID: -4094324337836264417, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Name + value: BackLeft + objectReference: {fileID: 0} + - target: {fileID: -2494737611447067790, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_LocalRotation.w + value: -0.14364506 + objectReference: {fileID: 0} + - target: {fileID: -2494737611447067790, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_LocalRotation.x + value: 0.6923629 + objectReference: {fileID: 0} + - target: {fileID: -2494737611447067790, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_LocalRotation.y + value: 0.14364499 + objectReference: {fileID: 0} + - target: {fileID: -2494737611447067790, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_LocalRotation.z + value: 0.69236255 + objectReference: {fileID: 0} + - target: {fileID: -2268792439729553393, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Name + value: Front + objectReference: {fileID: 0} + - target: {fileID: -1581129817633531703, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Name + value: FrontLeft + objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} propertyPath: m_Name value: SpeedySpiderMonster objectReference: {fileID: 0} + - target: {fileID: 1426054167981981833, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Name + value: BackRight + objectReference: {fileID: 0} + - target: {fileID: 5496101413780855358, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Name + value: FrontRight + objectReference: {fileID: 0} + - target: {fileID: 5866666021909216657, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Controller + value: + objectReference: {fileID: 9100000, guid: 51e21f7f50629d640875eea7173918fc, type: 2} + - target: {fileID: 5866666021909216657, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_ApplyRootMotion + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 6905609870639353253, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Name + value: Root + objectReference: {fileID: 0} + - target: {fileID: 8417361359673230750, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Materials.Array.size + value: 2 + objectReference: {fileID: 0} - target: {fileID: 8417361359673230750, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} propertyPath: m_Materials.Array.data[0] value: - objectReference: {fileID: 2100000, guid: c7673a4f936351d4da381a8cbebd6571, type: 2} + objectReference: {fileID: 2100000, guid: 36bbb425cf6fefc4fa259856e7ee21df, type: 2} + - target: {fileID: 8417361359673230750, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + propertyPath: m_Materials.Array.data[1] + value: + objectReference: {fileID: 2100000, guid: 53ab8bcce7ce70342a13f65c0c773d03, type: 2} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} +--- !u!1 &1923832269 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: e8c95314bdadb644b87be50d00a64f8c, type: 3} + m_PrefabInstance: {fileID: 1923832268} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1923832270 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1923832269} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c8a0c0569a0425a4285afca9aac74fb5, type: 3} + m_Name: + m_EditorClassIdentifier: + ikActive: 0 + rightHandObj: {fileID: 1557780301} + lookObj: {fileID: 1557780301} --- !u!1001 &1974411537 PrefabInstance: m_ObjectHideFlags: 0 @@ -2805,7 +2978,7 @@ PrefabInstance: m_Modifications: - target: {fileID: -8679921383154817045, guid: dac256f768a92694eaabad36235f22a5, type: 3} propertyPath: m_RootOrder - value: 4 + value: 5 objectReference: {fileID: 0} - target: {fileID: -8679921383154817045, guid: dac256f768a92694eaabad36235f22a5, type: 3} propertyPath: m_LocalScale.x @@ -2972,7 +3145,7 @@ Transform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 16 + m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &2006386675 PrefabInstance: @@ -4006,7 +4179,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2646791548311929742, guid: 921205ad18755e043ab119bf41a01a60, type: 3} propertyPath: m_RootOrder - value: 10 + value: 11 objectReference: {fileID: 0} - target: {fileID: 2646791548311929742, guid: 921205ad18755e043ab119bf41a01a60, type: 3} propertyPath: m_LocalPosition.x @@ -6119,7 +6292,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3} propertyPath: m_RootOrder - value: 12 + value: 13 objectReference: {fileID: 0} - target: {fileID: 7982337625154020194, guid: db61f30670495034d8ce2e8c7448cec9, type: 3} propertyPath: m_LocalPosition.x diff --git a/Assets/Scripts/Enemies/SpeedyMonster.meta b/Assets/Scripts/Enemies/SpeedyMonster.meta new file mode 100644 index 0000000..f2af28f --- /dev/null +++ b/Assets/Scripts/Enemies/SpeedyMonster.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eab655682b85334488b2f5513e3002d0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs b/Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs new file mode 100644 index 0000000..3681c75 --- /dev/null +++ b/Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs @@ -0,0 +1,45 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Speedy_IKTargeting : MonoBehaviour +{ + protected Animator animator; + + public bool ikActive = false; + public Transform rightHandObj = null; + public Transform lookObj = null; + + // Start is called before the first frame update + void Start() + { + animator = GetComponent(); + } + + private void OnAnimatorIK(int layerIndex) + { + if(ikActive) + { + // Set the look target position, if one has been assigned + if (lookObj != null) + { + animator.SetLookAtWeight(1); + animator.SetLookAtPosition(lookObj.position); + } + + // Set the right hand target position and rotation, if one has been assigned + if (rightHandObj != null) + { + animator.SetIKPositionWeight(AvatarIKGoal.RightHand, 1); + animator.SetIKRotationWeight(AvatarIKGoal.RightHand, 1); + animator.SetIKPosition(AvatarIKGoal.RightHand, rightHandObj.position); + animator.SetIKRotation(AvatarIKGoal.RightHand, rightHandObj.rotation); + } + } else + { + animator.SetIKPositionWeight(AvatarIKGoal.RightHand, 0); + animator.SetIKRotationWeight(AvatarIKGoal.RightHand, 0); + animator.SetLookAtWeight(0); + } + } +} diff --git a/Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs.meta b/Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs.meta new file mode 100644 index 0000000..b47b83d --- /dev/null +++ b/Assets/Scripts/Enemies/SpeedyMonster/Speedy_IKTargeting.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c8a0c0569a0425a4285afca9aac74fb5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: