From e53a53e48ffc9c1a8ce65fb4def5bb72a2bae7be Mon Sep 17 00:00:00 2001 From: Garrett Kaiser Date: Mon, 5 Jan 2026 14:05:58 -0800 Subject: [PATCH] we --- Assets/Materials/leaf.mat | 3 +- Assets/Materials/trunk.mat | 3 +- Assets/Prefabs/ThrownGun.prefab | 86 ++++++++++++++++++++++- Assets/Prefabs/gun(2).prefab | 59 ++++++++++++++++ Assets/Prefabs/gun(2).prefab.meta | 7 ++ Assets/Scenes/Scene1-1.unity | 4 +- Assets/Scripts/GunThrown.cs | 7 +- Assets/models/gun(2).fbx | 3 + Assets/models/gun(2).fbx.meta | 110 ++++++++++++++++++++++++++++++ 9 files changed, 271 insertions(+), 11 deletions(-) create mode 100644 Assets/Prefabs/gun(2).prefab create mode 100644 Assets/Prefabs/gun(2).prefab.meta create mode 100644 Assets/models/gun(2).fbx create mode 100644 Assets/models/gun(2).fbx.meta diff --git a/Assets/Materials/leaf.mat b/Assets/Materials/leaf.mat index ab1d39e..7e8c3b7 100644 --- a/Assets/Materials/leaf.mat +++ b/Assets/Materials/leaf.mat @@ -20,8 +20,7 @@ Material: m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} - disabledShaderPasses: - - MOTIONVECTORS + disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: serializedVersion: 3 diff --git a/Assets/Materials/trunk.mat b/Assets/Materials/trunk.mat index aec35c9..ba3e0e4 100644 --- a/Assets/Materials/trunk.mat +++ b/Assets/Materials/trunk.mat @@ -20,8 +20,7 @@ Material: m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} - disabledShaderPasses: - - MOTIONVECTORS + disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: serializedVersion: 3 diff --git a/Assets/Prefabs/ThrownGun.prefab b/Assets/Prefabs/ThrownGun.prefab index 29d7bbf..639264b 100644 --- a/Assets/Prefabs/ThrownGun.prefab +++ b/Assets/Prefabs/ThrownGun.prefab @@ -33,7 +33,8 @@ Transform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0.4, y: 0.5, z: 0.4} m_ConstrainProportionsScale: 0 - m_Children: [] + m_Children: + - {fileID: 9031458065949887395} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} --- !u!33 &5688607449888095492 @@ -51,7 +52,7 @@ MeshRenderer: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 6611039685471789196} - m_Enabled: 1 + m_Enabled: 0 m_CastShadows: 1 m_ReceiveShadows: 1 m_DynamicOccludee: 1 @@ -112,7 +113,7 @@ CapsuleCollider: m_Enabled: 1 serializedVersion: 2 m_Radius: 0.5 - m_Height: 2 + m_Height: 4 m_Direction: 1 m_Center: {x: 0, y: 0, z: 0} --- !u!114 &7066644236778025839 @@ -130,6 +131,7 @@ MonoBehaviour: rb: {fileID: 6393509116105302420} player: {fileID: 0} TargetPosition: {x: 0, y: 0, z: 0} + playerDistance: 0 currentRotation: {x: 0, y: 0, z: 0} targetRotation: {x: 0, y: 0, z: 0, w: 0} isStuck: 0 @@ -161,3 +163,81 @@ Rigidbody: m_Interpolate: 0 m_Constraints: 0 m_CollisionDetection: 1 +--- !u!1001 &9195834916317290860 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2838261725573212642} + m_Modifications: + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalScale.y + value: 0.88888884 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalScale.z + value: 0.88888884 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalRotation.y + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalRotation.z + value: -0.7071068 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 90 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_ConstrainProportionsScale + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 685625544054550645, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + propertyPath: m_Name + value: gun(2) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} +--- !u!4 &9031458065949887395 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 200414994334902991, guid: aab294e47e7d04c89bbe94d901f8e108, type: 3} + m_PrefabInstance: {fileID: 9195834916317290860} + m_PrefabAsset: {fileID: 0} diff --git a/Assets/Prefabs/gun(2).prefab b/Assets/Prefabs/gun(2).prefab new file mode 100644 index 0000000..a9d8b89 --- /dev/null +++ b/Assets/Prefabs/gun(2).prefab @@ -0,0 +1,59 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &379073252485696804 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalPosition.x + value: 527.1048 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalPosition.y + value: 25.502022 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalPosition.z + value: 216.44846 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} + propertyPath: m_Name + value: gun(2) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70, type: 3} diff --git a/Assets/Prefabs/gun(2).prefab.meta b/Assets/Prefabs/gun(2).prefab.meta new file mode 100644 index 0000000..7802035 --- /dev/null +++ b/Assets/Prefabs/gun(2).prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: aab294e47e7d04c89bbe94d901f8e108 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/Scene1-1.unity b/Assets/Scenes/Scene1-1.unity index d520b0d..e05f4f9 100644 --- a/Assets/Scenes/Scene1-1.unity +++ b/Assets/Scenes/Scene1-1.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f28c83add43691076f8e47c7fda08254b5634f6af3fa3262a6b788aee80b80e3 -size 1434415 +oid sha256:913942c92e4d0d59e3486e6ce09036c2d7fcdd2f4ad93d109d90a253c098688f +size 1436858 diff --git a/Assets/Scripts/GunThrown.cs b/Assets/Scripts/GunThrown.cs index 7bb890e..ed7a318 100644 --- a/Assets/Scripts/GunThrown.cs +++ b/Assets/Scripts/GunThrown.cs @@ -41,8 +41,11 @@ public class GunThrown : MonoBehaviour void Update() { //transform.position = Vector3.MoveTowards(transform.position, TargetPosition, 10 * Time.deltaTime); - targetRotation = Quaternion.Euler (-20f, currentRotation.y, currentRotation.z); - transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation , -1); + if (Time.timeScale == 1) + { + targetRotation = Quaternion.Euler(-20f, currentRotation.y, currentRotation.z); + transform.rotation = Quaternion.RotateTowards(transform.rotation, targetRotation, -0.8f); + } if (transform.position == TargetPosition) { diff --git a/Assets/models/gun(2).fbx b/Assets/models/gun(2).fbx new file mode 100644 index 0000000..619c2be --- /dev/null +++ b/Assets/models/gun(2).fbx @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:76b517e3bd6fee1972d3772fc0de177585ac17fb2f26e884c4add7c2fcd73dc4 +size 55980 diff --git a/Assets/models/gun(2).fbx.meta b/Assets/models/gun(2).fbx.meta new file mode 100644 index 0000000..6f6d050 --- /dev/null +++ b/Assets/models/gun(2).fbx.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 9cfcfcb1b0db4456bb0c5dbea19e3a70 +ModelImporter: + serializedVersion: 24200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 0 + motionNodeName: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importPhysicalCameras: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + generateMeshLods: 0 + meshLodGenerationFlags: 0 + maximumMeshLod: -1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + importBlendShapeDeformPercent: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: