From 7ca5e9bfdc9d2d31581e40f53b92bd6044cd313f Mon Sep 17 00:00:00 2001 From: Hazim Bin Ijaz Date: Fri, 26 Sep 2025 22:43:39 +0500 Subject: [PATCH] Added animation handling --- .../run backward.fbx.meta | 83 +++++++++++++------ .../run forward.fbx.meta | 83 +++++++++++++------ .../run left.fbx.meta | 83 +++++++++++++------ .../run right.fbx.meta | 83 +++++++++++++------ .../Player/Agent/PlayerAgentChillGuy.prefab | 22 +++-- Assets/Scripts/Player/PlayerAgent.cs | 15 +++- Assets/Scripts/Player/PlayerBody.cs | 12 +-- 7 files changed, 258 insertions(+), 123 deletions(-) diff --git a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run backward.fbx.meta b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run backward.fbx.meta index 237f4aa..86ba781 100644 --- a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run backward.fbx.meta +++ b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run backward.fbx.meta @@ -29,7 +29,36 @@ ModelImporter: animationWrapMode: 0 extraExposedTransformPaths: [] extraUserProperties: [] - clipAnimations: [] + clipAnimations: + - serializedVersion: 16 + name: mixamo.com + takeName: mixamo.com + internalID: -203655887218126122 + firstFrame: 0 + lastFrame: 15 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + hasAdditiveReferencePose: 0 + loopTime: 1 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 3 + maskSource: {instanceID: 0} + additiveReferencePoseFrame: 0 isReadable: 0 meshes: lODScreenPercentages: [] @@ -269,127 +298,127 @@ ModelImporter: scale: {x: 1, y: 1, z: 1} - name: Hips parentName: Armature - position: {x: 0.000008620777, y: 0.00007812082, z: 0.006968982} + position: {x: 0.00086207775, y: 0.0078120823, z: 0.6968982} rotation: {x: 0.6347461, y: 0.019573202, z: 0.0000000027939675, w: 0.7724728} scale: {x: 1, y: 0.9999998, z: 0.9999998} - name: LeftUpLeg parentName: Hips - position: {x: -0.0013203496, y: -0.0005527863, z: -0.00019512764} + position: {x: -0.13203496, y: -0.05527863, z: -0.019512763} rotation: {x: 0.97486407, y: -0.12770255, z: 0.12963569, w: -0.12855628} scale: {x: 0.9999997, y: 1.0000007, z: 1.0000001} - name: LeftLeg parentName: LeftUpLeg - position: {x: -8.34465e-11, y: 0.00223884, z: -1.0728836e-10} + position: {x: -0.00000000834465, y: 0.22388402, z: -0.000000010728836} rotation: {x: 0.052358076, y: -0.18271193, z: -0.15866658, w: 0.96886533} scale: {x: 1.0000002, y: 1.0000004, z: 1.0000002} - name: LeftFoot parentName: LeftLeg - position: {x: -7.152557e-11, y: 0.0022689623, z: -2.3841857e-11} + position: {x: -0.000000007152557, y: 0.22689623, z: -0.0000000023841857} rotation: {x: -0.4269109, y: 0.10761799, z: 0.15697038, w: 0.88403946} scale: {x: 1.0000001, y: 0.9999992, z: 0.99999934} - name: LeftToeBase parentName: LeftFoot - position: {x: 5.960465e-11, y: 0.002548261, z: 4.7683715e-11} + position: {x: 0.0000000059604646, y: 0.2548261, z: 0.0000000047683715} rotation: {x: -0.3929984, y: 0.10089544, z: 0.043432634, w: 0.9129545} scale: {x: 0.9999997, y: 1.0000006, z: 1.0000001} - name: RightUpLeg parentName: Hips - position: {x: 0.0013572861, y: -0.00048880716, z: -0.00010088403} + position: {x: 0.13572861, y: -0.048880715, z: -0.010088404} rotation: {x: 0.97633857, y: 0.15556088, z: -0.10308635, w: -0.10925739} scale: {x: 1.0000004, y: 1.0000008, z: 1.000001} - name: RightLeg parentName: RightUpLeg - position: {x: 2.026558e-10, y: 0.002236212, z: 5.252659e-11} + position: {x: 0.00000002026558, y: 0.22362119, z: 0.000000005252659} rotation: {x: 0.076937035, y: 0.17356962, z: 0.1476346, w: 0.97064835} scale: {x: 1, y: 1, z: 0.9999998} - name: RightFoot parentName: RightLeg - position: {x: 2.1457672e-10, y: 0.0022283478, z: 1.3113022e-10} + position: {x: 0.000000021457671, y: 0.22283478, z: 0.000000013113022} rotation: {x: -0.43630642, y: -0.07321879, z: -0.15268569, w: 0.88372105} scale: {x: 1, y: 1, z: 1} - name: RightToeBase parentName: RightFoot - position: {x: -3.5762787e-10, y: 0.002620976, z: 4.7683715e-11} + position: {x: -0.00000003576279, y: 0.2620976, z: 0.0000000047683715} rotation: {x: -0.39105862, y: -0.124699, z: -0.053569786, w: 0.9103041} scale: {x: 1.0000002, y: 1, z: 1.0000001} - name: Spine02 parentName: Hips - position: {x: -0.00003693676, y: 0.0018229355, z: 0.00029601186} + position: {x: -0.0036936759, y: 0.18229355, z: 0.029601187} rotation: {x: 0.08047545, y: -0.00885627, z: 0.009316418, w: 0.99667376} scale: {x: 1, y: 1.0000001, z: 1} - name: Spine01 parentName: Spine02 - position: {x: -5.2154062e-12, y: 0.0018471819, z: -7.0780517e-12} + position: {x: -5.2154064e-10, y: 0.18471819, z: -7.0780515e-10} rotation: {x: -0, y: -0.000000026077029, z: -0.000000024097968, w: 1} scale: {x: 1, y: 0.99999994, z: 1.0000001} - name: Spine parentName: Spine01 - position: {x: 1.2665987e-11, y: 0.0018471774, z: -4.3725596e-11} + position: {x: 0.0000000012665987, y: 0.18471774, z: -0.0000000043725596} rotation: {x: -0.043602943, y: -0.0039989944, z: 0.0034558985, w: 0.999035} scale: {x: 1.0000001, y: 1.0000001, z: 1.0000002} - name: LeftShoulder parentName: Spine - position: {x: -0.0007012161, y: 0.0005924089, z: -0.00006807985} + position: {x: -0.07012161, y: 0.05924089, z: -0.006807985} rotation: {x: -0.51618844, y: 0.5422167, z: -0.4811974, w: -0.45606986} scale: {x: 0.9999997, y: 0.9999996, z: 0.99999976} - name: LeftArm parentName: LeftShoulder - position: {x: -1.8984973e-11, y: 0.0028042244, z: -0.0000000015372723} + position: {x: -0.0000000018984974, y: 0.28042245, z: -0.00000015372723} rotation: {x: -0.025042793, y: 0.08207504, z: -0.0042382167, w: -0.9963024} scale: {x: 0.9999999, y: 1.0000004, z: 1.0000001} - name: LeftForeArm parentName: LeftArm - position: {x: -0, y: 0.0025871473, z: 1.3113022e-10} + position: {x: -0, y: 0.25871474, z: 0.000000013113022} rotation: {x: -0.051252622, y: 0.083890416, z: -0.057031773, w: 0.99352056} scale: {x: 1, y: 1.0000001, z: 1.0000001} - name: LeftHand parentName: LeftForeArm - position: {x: -8.34465e-11, y: 0.002552687, z: -1.6465783e-10} + position: {x: -0.00000000834465, y: 0.2552687, z: -0.000000016465783} rotation: {x: 0.015027203, y: -0.014462277, z: -0.0075130756, w: 0.9997543} scale: {x: 1.0000005, y: 1.0000005, z: 1.0000005} - name: RightShoulder parentName: Spine - position: {x: 0.0006734134, y: 0.0005952743, z: -0.000054443204} + position: {x: 0.06734134, y: 0.05952743, z: -0.0054443204} rotation: {x: 0.5167336, y: 0.54169714, z: -0.47870937, w: 0.45868066} scale: {x: 1, y: 1.0000002, z: 1} - name: RightArm parentName: RightShoulder - position: {x: 6.7320795e-11, y: 0.0027008068, z: -1.318544e-10} + position: {x: 0.0000000067320793, y: 0.2700807, z: -0.00000001318544} rotation: {x: 0.025295356, y: 0.07005207, z: -0.0020591612, w: 0.9972205} scale: {x: 1.0000004, y: 0.9999999, z: 1.0000004} - name: RightForeArm parentName: RightArm - position: {x: 4.7683715e-11, y: 0.0027807888, z: -7.1525574e-10} + position: {x: 0.0000000047683715, y: 0.27807888, z: -0.00000007152558} rotation: {x: -0.051193386, y: -0.06344204, z: 0.059899032, w: 0.99487007} scale: {x: 1, y: 1, z: 0.9999999} - name: RightHand parentName: RightForeArm - position: {x: -1.1920929e-11, y: 0.0023640236, z: 6.109476e-10} + position: {x: -0.0000000011920929, y: 0.23640236, z: 0.00000006109476} rotation: {x: -0.005115695, y: -0.0049273516, z: 0.008241137, w: 0.9999408} scale: {x: 0.9999998, y: 0.99999976, z: 0.9999999} - name: neck parentName: Spine - position: {x: 0.000027802718, y: 0.0014009976, z: 0.0001225228} + position: {x: 0.002780272, y: 0.14009976, z: 0.0122522805} rotation: {x: 0.043699726, y: 0.010737753, z: -0.0094235465, w: 0.99894255} scale: {x: 1, y: 0.9999999, z: 0.99999964} - name: Head parentName: neck - position: {x: 4.470348e-12, y: 0.00096879114, z: -8.7916854e-11} + position: {x: 4.4703483e-10, y: 0.09687912, z: -0.000000008791686} rotation: {x: 0.17665383, y: 0.000011541878, z: 0.0038604161, w: 0.9842655} scale: {x: 0.9999999, y: 1, z: 1.0000004} - name: head_end parentName: Head - position: {x: 0.00004951258, y: 0.006569221, z: -0.0022563587} + position: {x: 0.0049512577, y: 0.6569221, z: -0.22563587} rotation: {x: -0.1646682, y: 0.0000000067566353, z: -0.0036133938, w: 0.98634243} scale: {x: 1.0000001, y: 0.9999999, z: 1} - name: headfront parentName: Head - position: {x: -0.00004951254, y: 0.0007510641, z: 0.0022563587} + position: {x: -0.004951254, y: 0.07510641, z: 0.22563587} rotation: {x: 0.58476937, y: 0.00000004595949, z: 0.012831977, w: 0.81109816} scale: {x: 1, y: 0.9999999, z: 0.9999999} - name: char1 parentName: ChillGuy(Clone) - position: {x: -4.649628e-10, y: -0.000000001500177, z: 3.422028e-11} + position: {x: -0.00000004649628, y: -0.0000001500177, z: 0.000000003422028} rotation: {x: -5.551115e-14, y: 0, z: -1.6940659e-21, w: 1} scale: {x: 1, y: 1, z: 1} armTwist: 0.5 @@ -399,7 +428,7 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 - globalScale: 0.01 + globalScale: 1 rootMotionBoneName: hasTranslationDoF: 0 hasExtraRoot: 1 diff --git a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run forward.fbx.meta b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run forward.fbx.meta index 1b6c89b..1fc45b2 100644 --- a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run forward.fbx.meta +++ b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run forward.fbx.meta @@ -29,7 +29,36 @@ ModelImporter: animationWrapMode: 0 extraExposedTransformPaths: [] extraUserProperties: [] - clipAnimations: [] + clipAnimations: + - serializedVersion: 16 + name: mixamo.com + takeName: mixamo.com + internalID: -203655887218126122 + firstFrame: 0 + lastFrame: 15 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + hasAdditiveReferencePose: 0 + loopTime: 1 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 3 + maskSource: {instanceID: 0} + additiveReferencePoseFrame: 0 isReadable: 0 meshes: lODScreenPercentages: [] @@ -269,127 +298,127 @@ ModelImporter: scale: {x: 1, y: 1, z: 1} - name: Hips parentName: Armature - position: {x: 0.000008620777, y: 0.00007812082, z: 0.006968982} + position: {x: 0.00086207775, y: 0.0078120823, z: 0.6968982} rotation: {x: 0.6347461, y: 0.019573202, z: 0.0000000027939675, w: 0.7724728} scale: {x: 1, y: 0.9999998, z: 0.9999998} - name: LeftUpLeg parentName: Hips - position: {x: -0.0013203496, y: -0.0005527863, z: -0.00019512764} + position: {x: -0.13203496, y: -0.05527863, z: -0.019512763} rotation: {x: 0.97486407, y: -0.12770255, z: 0.12963569, w: -0.12855628} scale: {x: 0.9999997, y: 1.0000007, z: 1.0000001} - name: LeftLeg parentName: LeftUpLeg - position: {x: -8.34465e-11, y: 0.00223884, z: -1.0728836e-10} + position: {x: -0.00000000834465, y: 0.22388402, z: -0.000000010728836} rotation: {x: 0.052358076, y: -0.18271193, z: -0.15866658, w: 0.96886533} scale: {x: 1.0000002, y: 1.0000004, z: 1.0000002} - name: LeftFoot parentName: LeftLeg - position: {x: -7.152557e-11, y: 0.0022689623, z: -2.3841857e-11} + position: {x: -0.000000007152557, y: 0.22689623, z: -0.0000000023841857} rotation: {x: -0.4269109, y: 0.10761799, z: 0.15697038, w: 0.88403946} scale: {x: 1.0000001, y: 0.9999992, z: 0.99999934} - name: LeftToeBase parentName: LeftFoot - position: {x: 5.960465e-11, y: 0.002548261, z: 4.7683715e-11} + position: {x: 0.0000000059604646, y: 0.2548261, z: 0.0000000047683715} rotation: {x: -0.3929984, y: 0.10089544, z: 0.043432634, w: 0.9129545} scale: {x: 0.9999997, y: 1.0000006, z: 1.0000001} - name: RightUpLeg parentName: Hips - position: {x: 0.0013572861, y: -0.00048880716, z: -0.00010088403} + position: {x: 0.13572861, y: -0.048880715, z: -0.010088404} rotation: {x: 0.97633857, y: 0.15556088, z: -0.10308635, w: -0.10925739} scale: {x: 1.0000004, y: 1.0000008, z: 1.000001} - name: RightLeg parentName: RightUpLeg - position: {x: 2.026558e-10, y: 0.002236212, z: 5.252659e-11} + position: {x: 0.00000002026558, y: 0.22362119, z: 0.000000005252659} rotation: {x: 0.076937035, y: 0.17356962, z: 0.1476346, w: 0.97064835} scale: {x: 1, y: 1, z: 0.9999998} - name: RightFoot parentName: RightLeg - position: {x: 2.1457672e-10, y: 0.0022283478, z: 1.3113022e-10} + position: {x: 0.000000021457671, y: 0.22283478, z: 0.000000013113022} rotation: {x: -0.43630642, y: -0.07321879, z: -0.15268569, w: 0.88372105} scale: {x: 1, y: 1, z: 1} - name: RightToeBase parentName: RightFoot - position: {x: -3.5762787e-10, y: 0.002620976, z: 4.7683715e-11} + position: {x: -0.00000003576279, y: 0.2620976, z: 0.0000000047683715} rotation: {x: -0.39105862, y: -0.124699, z: -0.053569786, w: 0.9103041} scale: {x: 1.0000002, y: 1, z: 1.0000001} - name: Spine02 parentName: Hips - position: {x: -0.00003693676, y: 0.0018229355, z: 0.00029601186} + position: {x: -0.0036936759, y: 0.18229355, z: 0.029601187} rotation: {x: 0.08047545, y: -0.00885627, z: 0.009316418, w: 0.99667376} scale: {x: 1, y: 1.0000001, z: 1} - name: Spine01 parentName: Spine02 - position: {x: -5.2154062e-12, y: 0.0018471819, z: -7.0780517e-12} + position: {x: -5.2154064e-10, y: 0.18471819, z: -7.0780515e-10} rotation: {x: -0, y: -0.000000026077029, z: -0.000000024097968, w: 1} scale: {x: 1, y: 0.99999994, z: 1.0000001} - name: Spine parentName: Spine01 - position: {x: 1.2665987e-11, y: 0.0018471774, z: -4.3725596e-11} + position: {x: 0.0000000012665987, y: 0.18471774, z: -0.0000000043725596} rotation: {x: -0.043602943, y: -0.0039989944, z: 0.0034558985, w: 0.999035} scale: {x: 1.0000001, y: 1.0000001, z: 1.0000002} - name: LeftShoulder parentName: Spine - position: {x: -0.0007012161, y: 0.0005924089, z: -0.00006807985} + position: {x: -0.07012161, y: 0.05924089, z: -0.006807985} rotation: {x: -0.51618844, y: 0.5422167, z: -0.4811974, w: -0.45606986} scale: {x: 0.9999997, y: 0.9999996, z: 0.99999976} - name: LeftArm parentName: LeftShoulder - position: {x: -1.8984973e-11, y: 0.0028042244, z: -0.0000000015372723} + position: {x: -0.0000000018984974, y: 0.28042245, z: -0.00000015372723} rotation: {x: -0.025042793, y: 0.08207504, z: -0.0042382167, w: -0.9963024} scale: {x: 0.9999999, y: 1.0000004, z: 1.0000001} - name: LeftForeArm parentName: LeftArm - position: {x: -0, y: 0.0025871473, z: 1.3113022e-10} + position: {x: -0, y: 0.25871474, z: 0.000000013113022} rotation: {x: -0.051252622, y: 0.083890416, z: -0.057031773, w: 0.99352056} scale: {x: 1, y: 1.0000001, z: 1.0000001} - name: LeftHand parentName: LeftForeArm - position: {x: -8.34465e-11, y: 0.002552687, z: -1.6465783e-10} + position: {x: -0.00000000834465, y: 0.2552687, z: -0.000000016465783} rotation: {x: 0.015027203, y: -0.014462277, z: -0.0075130756, w: 0.9997543} scale: {x: 1.0000005, y: 1.0000005, z: 1.0000005} - name: RightShoulder parentName: Spine - position: {x: 0.0006734134, y: 0.0005952743, z: -0.000054443204} + position: {x: 0.06734134, y: 0.05952743, z: -0.0054443204} rotation: {x: 0.5167336, y: 0.54169714, z: -0.47870937, w: 0.45868066} scale: {x: 1, y: 1.0000002, z: 1} - name: RightArm parentName: RightShoulder - position: {x: 6.7320795e-11, y: 0.0027008068, z: -1.318544e-10} + position: {x: 0.0000000067320793, y: 0.2700807, z: -0.00000001318544} rotation: {x: 0.025295356, y: 0.07005207, z: -0.0020591612, w: 0.9972205} scale: {x: 1.0000004, y: 0.9999999, z: 1.0000004} - name: RightForeArm parentName: RightArm - position: {x: 4.7683715e-11, y: 0.0027807888, z: -7.1525574e-10} + position: {x: 0.0000000047683715, y: 0.27807888, z: -0.00000007152558} rotation: {x: -0.051193386, y: -0.06344204, z: 0.059899032, w: 0.99487007} scale: {x: 1, y: 1, z: 0.9999999} - name: RightHand parentName: RightForeArm - position: {x: -1.1920929e-11, y: 0.0023640236, z: 6.109476e-10} + position: {x: -0.0000000011920929, y: 0.23640236, z: 0.00000006109476} rotation: {x: -0.005115695, y: -0.0049273516, z: 0.008241137, w: 0.9999408} scale: {x: 0.9999998, y: 0.99999976, z: 0.9999999} - name: neck parentName: Spine - position: {x: 0.000027802718, y: 0.0014009976, z: 0.0001225228} + position: {x: 0.002780272, y: 0.14009976, z: 0.0122522805} rotation: {x: 0.043699726, y: 0.010737753, z: -0.0094235465, w: 0.99894255} scale: {x: 1, y: 0.9999999, z: 0.99999964} - name: Head parentName: neck - position: {x: 4.470348e-12, y: 0.00096879114, z: -8.7916854e-11} + position: {x: 4.4703483e-10, y: 0.09687912, z: -0.000000008791686} rotation: {x: 0.17665383, y: 0.000011541878, z: 0.0038604161, w: 0.9842655} scale: {x: 0.9999999, y: 1, z: 1.0000004} - name: head_end parentName: Head - position: {x: 0.00004951258, y: 0.006569221, z: -0.0022563587} + position: {x: 0.0049512577, y: 0.6569221, z: -0.22563587} rotation: {x: -0.1646682, y: 0.0000000067566353, z: -0.0036133938, w: 0.98634243} scale: {x: 1.0000001, y: 0.9999999, z: 1} - name: headfront parentName: Head - position: {x: -0.00004951254, y: 0.0007510641, z: 0.0022563587} + position: {x: -0.004951254, y: 0.07510641, z: 0.22563587} rotation: {x: 0.58476937, y: 0.00000004595949, z: 0.012831977, w: 0.81109816} scale: {x: 1, y: 0.9999999, z: 0.9999999} - name: char1 parentName: ChillGuy(Clone) - position: {x: -4.649628e-10, y: -0.000000001500177, z: 3.422028e-11} + position: {x: -0.00000004649628, y: -0.0000001500177, z: 0.000000003422028} rotation: {x: -5.551115e-14, y: 0, z: -1.6940659e-21, w: 1} scale: {x: 1, y: 1, z: 1} armTwist: 0.5 @@ -399,7 +428,7 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 - globalScale: 0.01 + globalScale: 1 rootMotionBoneName: hasTranslationDoF: 0 hasExtraRoot: 1 diff --git a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run left.fbx.meta b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run left.fbx.meta index cd28078..e6cbfb1 100644 --- a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run left.fbx.meta +++ b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run left.fbx.meta @@ -29,7 +29,36 @@ ModelImporter: animationWrapMode: 0 extraExposedTransformPaths: [] extraUserProperties: [] - clipAnimations: [] + clipAnimations: + - serializedVersion: 16 + name: mixamo.com + takeName: mixamo.com + internalID: -203655887218126122 + firstFrame: 0 + lastFrame: 15 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + hasAdditiveReferencePose: 0 + loopTime: 1 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 3 + maskSource: {instanceID: 0} + additiveReferencePoseFrame: 0 isReadable: 0 meshes: lODScreenPercentages: [] @@ -269,127 +298,127 @@ ModelImporter: scale: {x: 1, y: 1, z: 1} - name: Hips parentName: Armature - position: {x: 0.000008620777, y: 0.00007812082, z: 0.006968982} + position: {x: 0.00086207775, y: 0.0078120823, z: 0.6968982} rotation: {x: 0.6347461, y: 0.019573202, z: 0.0000000027939675, w: 0.7724728} scale: {x: 1, y: 0.9999998, z: 0.9999998} - name: LeftUpLeg parentName: Hips - position: {x: -0.0013203496, y: -0.0005527863, z: -0.00019512764} + position: {x: -0.13203496, y: -0.05527863, z: -0.019512763} rotation: {x: 0.97486407, y: -0.12770255, z: 0.12963569, w: -0.12855628} scale: {x: 0.9999997, y: 1.0000007, z: 1.0000001} - name: LeftLeg parentName: LeftUpLeg - position: {x: -8.34465e-11, y: 0.00223884, z: -1.0728836e-10} + position: {x: -0.00000000834465, y: 0.22388402, z: -0.000000010728836} rotation: {x: 0.052358076, y: -0.18271193, z: -0.15866658, w: 0.96886533} scale: {x: 1.0000002, y: 1.0000004, z: 1.0000002} - name: LeftFoot parentName: LeftLeg - position: {x: -7.152557e-11, y: 0.0022689623, z: -2.3841857e-11} + position: {x: -0.000000007152557, y: 0.22689623, z: -0.0000000023841857} rotation: {x: -0.4269109, y: 0.10761799, z: 0.15697038, w: 0.88403946} scale: {x: 1.0000001, y: 0.9999992, z: 0.99999934} - name: LeftToeBase parentName: LeftFoot - position: {x: 5.960465e-11, y: 0.002548261, z: 4.7683715e-11} + position: {x: 0.0000000059604646, y: 0.2548261, z: 0.0000000047683715} rotation: {x: -0.3929984, y: 0.10089544, z: 0.043432634, w: 0.9129545} scale: {x: 0.9999997, y: 1.0000006, z: 1.0000001} - name: RightUpLeg parentName: Hips - position: {x: 0.0013572861, y: -0.00048880716, z: -0.00010088403} + position: {x: 0.13572861, y: -0.048880715, z: -0.010088404} rotation: {x: 0.97633857, y: 0.15556088, z: -0.10308635, w: -0.10925739} scale: {x: 1.0000004, y: 1.0000008, z: 1.000001} - name: RightLeg parentName: RightUpLeg - position: {x: 2.026558e-10, y: 0.002236212, z: 5.252659e-11} + position: {x: 0.00000002026558, y: 0.22362119, z: 0.000000005252659} rotation: {x: 0.076937035, y: 0.17356962, z: 0.1476346, w: 0.97064835} scale: {x: 1, y: 1, z: 0.9999998} - name: RightFoot parentName: RightLeg - position: {x: 2.1457672e-10, y: 0.0022283478, z: 1.3113022e-10} + position: {x: 0.000000021457671, y: 0.22283478, z: 0.000000013113022} rotation: {x: -0.43630642, y: -0.07321879, z: -0.15268569, w: 0.88372105} scale: {x: 1, y: 1, z: 1} - name: RightToeBase parentName: RightFoot - position: {x: -3.5762787e-10, y: 0.002620976, z: 4.7683715e-11} + position: {x: -0.00000003576279, y: 0.2620976, z: 0.0000000047683715} rotation: {x: -0.39105862, y: -0.124699, z: -0.053569786, w: 0.9103041} scale: {x: 1.0000002, y: 1, z: 1.0000001} - name: Spine02 parentName: Hips - position: {x: -0.00003693676, y: 0.0018229355, z: 0.00029601186} + position: {x: -0.0036936759, y: 0.18229355, z: 0.029601187} rotation: {x: 0.08047545, y: -0.00885627, z: 0.009316418, w: 0.99667376} scale: {x: 1, y: 1.0000001, z: 1} - name: Spine01 parentName: Spine02 - position: {x: -5.2154062e-12, y: 0.0018471819, z: -7.0780517e-12} + position: {x: -5.2154064e-10, y: 0.18471819, z: -7.0780515e-10} rotation: {x: -0, y: -0.000000026077029, z: -0.000000024097968, w: 1} scale: {x: 1, y: 0.99999994, z: 1.0000001} - name: Spine parentName: Spine01 - position: {x: 1.2665987e-11, y: 0.0018471774, z: -4.3725596e-11} + position: {x: 0.0000000012665987, y: 0.18471774, z: -0.0000000043725596} rotation: {x: -0.043602943, y: -0.0039989944, z: 0.0034558985, w: 0.999035} scale: {x: 1.0000001, y: 1.0000001, z: 1.0000002} - name: LeftShoulder parentName: Spine - position: {x: -0.0007012161, y: 0.0005924089, z: -0.00006807985} + position: {x: -0.07012161, y: 0.05924089, z: -0.006807985} rotation: {x: -0.51618844, y: 0.5422167, z: -0.4811974, w: -0.45606986} scale: {x: 0.9999997, y: 0.9999996, z: 0.99999976} - name: LeftArm parentName: LeftShoulder - position: {x: -1.8984973e-11, y: 0.0028042244, z: -0.0000000015372723} + position: {x: -0.0000000018984974, y: 0.28042245, z: -0.00000015372723} rotation: {x: -0.025042793, y: 0.08207504, z: -0.0042382167, w: -0.9963024} scale: {x: 0.9999999, y: 1.0000004, z: 1.0000001} - name: LeftForeArm parentName: LeftArm - position: {x: -0, y: 0.0025871473, z: 1.3113022e-10} + position: {x: -0, y: 0.25871474, z: 0.000000013113022} rotation: {x: -0.051252622, y: 0.083890416, z: -0.057031773, w: 0.99352056} scale: {x: 1, y: 1.0000001, z: 1.0000001} - name: LeftHand parentName: LeftForeArm - position: {x: -8.34465e-11, y: 0.002552687, z: -1.6465783e-10} + position: {x: -0.00000000834465, y: 0.2552687, z: -0.000000016465783} rotation: {x: 0.015027203, y: -0.014462277, z: -0.0075130756, w: 0.9997543} scale: {x: 1.0000005, y: 1.0000005, z: 1.0000005} - name: RightShoulder parentName: Spine - position: {x: 0.0006734134, y: 0.0005952743, z: -0.000054443204} + position: {x: 0.06734134, y: 0.05952743, z: -0.0054443204} rotation: {x: 0.5167336, y: 0.54169714, z: -0.47870937, w: 0.45868066} scale: {x: 1, y: 1.0000002, z: 1} - name: RightArm parentName: RightShoulder - position: {x: 6.7320795e-11, y: 0.0027008068, z: -1.318544e-10} + position: {x: 0.0000000067320793, y: 0.2700807, z: -0.00000001318544} rotation: {x: 0.025295356, y: 0.07005207, z: -0.0020591612, w: 0.9972205} scale: {x: 1.0000004, y: 0.9999999, z: 1.0000004} - name: RightForeArm parentName: RightArm - position: {x: 4.7683715e-11, y: 0.0027807888, z: -7.1525574e-10} + position: {x: 0.0000000047683715, y: 0.27807888, z: -0.00000007152558} rotation: {x: -0.051193386, y: -0.06344204, z: 0.059899032, w: 0.99487007} scale: {x: 1, y: 1, z: 0.9999999} - name: RightHand parentName: RightForeArm - position: {x: -1.1920929e-11, y: 0.0023640236, z: 6.109476e-10} + position: {x: -0.0000000011920929, y: 0.23640236, z: 0.00000006109476} rotation: {x: -0.005115695, y: -0.0049273516, z: 0.008241137, w: 0.9999408} scale: {x: 0.9999998, y: 0.99999976, z: 0.9999999} - name: neck parentName: Spine - position: {x: 0.000027802718, y: 0.0014009976, z: 0.0001225228} + position: {x: 0.002780272, y: 0.14009976, z: 0.0122522805} rotation: {x: 0.043699726, y: 0.010737753, z: -0.0094235465, w: 0.99894255} scale: {x: 1, y: 0.9999999, z: 0.99999964} - name: Head parentName: neck - position: {x: 4.470348e-12, y: 0.00096879114, z: -8.7916854e-11} + position: {x: 4.4703483e-10, y: 0.09687912, z: -0.000000008791686} rotation: {x: 0.17665383, y: 0.000011541878, z: 0.0038604161, w: 0.9842655} scale: {x: 0.9999999, y: 1, z: 1.0000004} - name: head_end parentName: Head - position: {x: 0.00004951258, y: 0.006569221, z: -0.0022563587} + position: {x: 0.0049512577, y: 0.6569221, z: -0.22563587} rotation: {x: -0.1646682, y: 0.0000000067566353, z: -0.0036133938, w: 0.98634243} scale: {x: 1.0000001, y: 0.9999999, z: 1} - name: headfront parentName: Head - position: {x: -0.00004951254, y: 0.0007510641, z: 0.0022563587} + position: {x: -0.004951254, y: 0.07510641, z: 0.22563587} rotation: {x: 0.58476937, y: 0.00000004595949, z: 0.012831977, w: 0.81109816} scale: {x: 1, y: 0.9999999, z: 0.9999999} - name: char1 parentName: ChillGuy(Clone) - position: {x: -4.649628e-10, y: -0.000000001500177, z: 3.422028e-11} + position: {x: -0.00000004649628, y: -0.0000001500177, z: 0.000000003422028} rotation: {x: -5.551115e-14, y: 0, z: -1.6940659e-21, w: 1} scale: {x: 1, y: 1, z: 1} armTwist: 0.5 @@ -399,7 +428,7 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 - globalScale: 0.01 + globalScale: 1 rootMotionBoneName: hasTranslationDoF: 0 hasExtraRoot: 1 diff --git a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run right.fbx.meta b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run right.fbx.meta index 87b7a7c..d410e34 100644 --- a/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run right.fbx.meta +++ b/Assets/Characters/Animation/TGBR/TGBR/Animations/Rifle 8-Way Locomotion Pack/run right.fbx.meta @@ -29,7 +29,36 @@ ModelImporter: animationWrapMode: 0 extraExposedTransformPaths: [] extraUserProperties: [] - clipAnimations: [] + clipAnimations: + - serializedVersion: 16 + name: mixamo.com + takeName: mixamo.com + internalID: -203655887218126122 + firstFrame: 0 + lastFrame: 15 + wrapMode: 0 + orientationOffsetY: 0 + level: 0 + cycleOffset: 0 + loop: 0 + hasAdditiveReferencePose: 0 + loopTime: 1 + loopBlend: 0 + loopBlendOrientation: 0 + loopBlendPositionY: 0 + loopBlendPositionXZ: 0 + keepOriginalOrientation: 0 + keepOriginalPositionY: 1 + keepOriginalPositionXZ: 0 + heightFromFeet: 0 + mirror: 0 + bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + curves: [] + events: [] + transformMask: [] + maskType: 3 + maskSource: {instanceID: 0} + additiveReferencePoseFrame: 0 isReadable: 0 meshes: lODScreenPercentages: [] @@ -269,127 +298,127 @@ ModelImporter: scale: {x: 1, y: 1, z: 1} - name: Hips parentName: Armature - position: {x: 0.000008620777, y: 0.00007812082, z: 0.006968982} + position: {x: 0.00086207775, y: 0.0078120823, z: 0.6968982} rotation: {x: 0.6347461, y: 0.019573202, z: 0.0000000027939675, w: 0.7724728} scale: {x: 1, y: 0.9999998, z: 0.9999998} - name: LeftUpLeg parentName: Hips - position: {x: -0.0013203496, y: -0.0005527863, z: -0.00019512764} + position: {x: -0.13203496, y: -0.05527863, z: -0.019512763} rotation: {x: 0.97486407, y: -0.12770255, z: 0.12963569, w: -0.12855628} scale: {x: 0.9999997, y: 1.0000007, z: 1.0000001} - name: LeftLeg parentName: LeftUpLeg - position: {x: -8.34465e-11, y: 0.00223884, z: -1.0728836e-10} + position: {x: -0.00000000834465, y: 0.22388402, z: -0.000000010728836} rotation: {x: 0.052358076, y: -0.18271193, z: -0.15866658, w: 0.96886533} scale: {x: 1.0000002, y: 1.0000004, z: 1.0000002} - name: LeftFoot parentName: LeftLeg - position: {x: -7.152557e-11, y: 0.0022689623, z: -2.3841857e-11} + position: {x: -0.000000007152557, y: 0.22689623, z: -0.0000000023841857} rotation: {x: -0.4269109, y: 0.10761799, z: 0.15697038, w: 0.88403946} scale: {x: 1.0000001, y: 0.9999992, z: 0.99999934} - name: LeftToeBase parentName: LeftFoot - position: {x: 5.960465e-11, y: 0.002548261, z: 4.7683715e-11} + position: {x: 0.0000000059604646, y: 0.2548261, z: 0.0000000047683715} rotation: {x: -0.3929984, y: 0.10089544, z: 0.043432634, w: 0.9129545} scale: {x: 0.9999997, y: 1.0000006, z: 1.0000001} - name: RightUpLeg parentName: Hips - position: {x: 0.0013572861, y: -0.00048880716, z: -0.00010088403} + position: {x: 0.13572861, y: -0.048880715, z: -0.010088404} rotation: {x: 0.97633857, y: 0.15556088, z: -0.10308635, w: -0.10925739} scale: {x: 1.0000004, y: 1.0000008, z: 1.000001} - name: RightLeg parentName: RightUpLeg - position: {x: 2.026558e-10, y: 0.002236212, z: 5.252659e-11} + position: {x: 0.00000002026558, y: 0.22362119, z: 0.000000005252659} rotation: {x: 0.076937035, y: 0.17356962, z: 0.1476346, w: 0.97064835} scale: {x: 1, y: 1, z: 0.9999998} - name: RightFoot parentName: RightLeg - position: {x: 2.1457672e-10, y: 0.0022283478, z: 1.3113022e-10} + position: {x: 0.000000021457671, y: 0.22283478, z: 0.000000013113022} rotation: {x: -0.43630642, y: -0.07321879, z: -0.15268569, w: 0.88372105} scale: {x: 1, y: 1, z: 1} - name: RightToeBase parentName: RightFoot - position: {x: -3.5762787e-10, y: 0.002620976, z: 4.7683715e-11} + position: {x: -0.00000003576279, y: 0.2620976, z: 0.0000000047683715} rotation: {x: -0.39105862, y: -0.124699, z: -0.053569786, w: 0.9103041} scale: {x: 1.0000002, y: 1, z: 1.0000001} - name: Spine02 parentName: Hips - position: {x: -0.00003693676, y: 0.0018229355, z: 0.00029601186} + position: {x: -0.0036936759, y: 0.18229355, z: 0.029601187} rotation: {x: 0.08047545, y: -0.00885627, z: 0.009316418, w: 0.99667376} scale: {x: 1, y: 1.0000001, z: 1} - name: Spine01 parentName: Spine02 - position: {x: -5.2154062e-12, y: 0.0018471819, z: -7.0780517e-12} + position: {x: -5.2154064e-10, y: 0.18471819, z: -7.0780515e-10} rotation: {x: -0, y: -0.000000026077029, z: -0.000000024097968, w: 1} scale: {x: 1, y: 0.99999994, z: 1.0000001} - name: Spine parentName: Spine01 - position: {x: 1.2665987e-11, y: 0.0018471774, z: -4.3725596e-11} + position: {x: 0.0000000012665987, y: 0.18471774, z: -0.0000000043725596} rotation: {x: -0.043602943, y: -0.0039989944, z: 0.0034558985, w: 0.999035} scale: {x: 1.0000001, y: 1.0000001, z: 1.0000002} - name: LeftShoulder parentName: Spine - position: {x: -0.0007012161, y: 0.0005924089, z: -0.00006807985} + position: {x: -0.07012161, y: 0.05924089, z: -0.006807985} rotation: {x: -0.51618844, y: 0.5422167, z: -0.4811974, w: -0.45606986} scale: {x: 0.9999997, y: 0.9999996, z: 0.99999976} - name: LeftArm parentName: LeftShoulder - position: {x: -1.8984973e-11, y: 0.0028042244, z: -0.0000000015372723} + position: {x: -0.0000000018984974, y: 0.28042245, z: -0.00000015372723} rotation: {x: -0.025042793, y: 0.08207504, z: -0.0042382167, w: -0.9963024} scale: {x: 0.9999999, y: 1.0000004, z: 1.0000001} - name: LeftForeArm parentName: LeftArm - position: {x: -0, y: 0.0025871473, z: 1.3113022e-10} + position: {x: -0, y: 0.25871474, z: 0.000000013113022} rotation: {x: -0.051252622, y: 0.083890416, z: -0.057031773, w: 0.99352056} scale: {x: 1, y: 1.0000001, z: 1.0000001} - name: LeftHand parentName: LeftForeArm - position: {x: -8.34465e-11, y: 0.002552687, z: -1.6465783e-10} + position: {x: -0.00000000834465, y: 0.2552687, z: -0.000000016465783} rotation: {x: 0.015027203, y: -0.014462277, z: -0.0075130756, w: 0.9997543} scale: {x: 1.0000005, y: 1.0000005, z: 1.0000005} - name: RightShoulder parentName: Spine - position: {x: 0.0006734134, y: 0.0005952743, z: -0.000054443204} + position: {x: 0.06734134, y: 0.05952743, z: -0.0054443204} rotation: {x: 0.5167336, y: 0.54169714, z: -0.47870937, w: 0.45868066} scale: {x: 1, y: 1.0000002, z: 1} - name: RightArm parentName: RightShoulder - position: {x: 6.7320795e-11, y: 0.0027008068, z: -1.318544e-10} + position: {x: 0.0000000067320793, y: 0.2700807, z: -0.00000001318544} rotation: {x: 0.025295356, y: 0.07005207, z: -0.0020591612, w: 0.9972205} scale: {x: 1.0000004, y: 0.9999999, z: 1.0000004} - name: RightForeArm parentName: RightArm - position: {x: 4.7683715e-11, y: 0.0027807888, z: -7.1525574e-10} + position: {x: 0.0000000047683715, y: 0.27807888, z: -0.00000007152558} rotation: {x: -0.051193386, y: -0.06344204, z: 0.059899032, w: 0.99487007} scale: {x: 1, y: 1, z: 0.9999999} - name: RightHand parentName: RightForeArm - position: {x: -1.1920929e-11, y: 0.0023640236, z: 6.109476e-10} + position: {x: -0.0000000011920929, y: 0.23640236, z: 0.00000006109476} rotation: {x: -0.005115695, y: -0.0049273516, z: 0.008241137, w: 0.9999408} scale: {x: 0.9999998, y: 0.99999976, z: 0.9999999} - name: neck parentName: Spine - position: {x: 0.000027802718, y: 0.0014009976, z: 0.0001225228} + position: {x: 0.002780272, y: 0.14009976, z: 0.0122522805} rotation: {x: 0.043699726, y: 0.010737753, z: -0.0094235465, w: 0.99894255} scale: {x: 1, y: 0.9999999, z: 0.99999964} - name: Head parentName: neck - position: {x: 4.470348e-12, y: 0.00096879114, z: -8.7916854e-11} + position: {x: 4.4703483e-10, y: 0.09687912, z: -0.000000008791686} rotation: {x: 0.17665383, y: 0.000011541878, z: 0.0038604161, w: 0.9842655} scale: {x: 0.9999999, y: 1, z: 1.0000004} - name: head_end parentName: Head - position: {x: 0.00004951258, y: 0.006569221, z: -0.0022563587} + position: {x: 0.0049512577, y: 0.6569221, z: -0.22563587} rotation: {x: -0.1646682, y: 0.0000000067566353, z: -0.0036133938, w: 0.98634243} scale: {x: 1.0000001, y: 0.9999999, z: 1} - name: headfront parentName: Head - position: {x: -0.00004951254, y: 0.0007510641, z: 0.0022563587} + position: {x: -0.004951254, y: 0.07510641, z: 0.22563587} rotation: {x: 0.58476937, y: 0.00000004595949, z: 0.012831977, w: 0.81109816} scale: {x: 1, y: 0.9999999, z: 0.9999999} - name: char1 parentName: ChillGuy(Clone) - position: {x: -4.649628e-10, y: -0.000000001500177, z: 3.422028e-11} + position: {x: -0.00000004649628, y: -0.0000001500177, z: 0.000000003422028} rotation: {x: -5.551115e-14, y: 0, z: -1.6940659e-21, w: 1} scale: {x: 1, y: 1, z: 1} armTwist: 0.5 @@ -399,7 +428,7 @@ ModelImporter: armStretch: 0.05 legStretch: 0.05 feetSpacing: 0 - globalScale: 0.01 + globalScale: 1 rootMotionBoneName: hasTranslationDoF: 0 hasExtraRoot: 1 diff --git a/Assets/Prefabs/Player/Agent/PlayerAgentChillGuy.prefab b/Assets/Prefabs/Player/Agent/PlayerAgentChillGuy.prefab index d0d1971..a974d0e 100644 --- a/Assets/Prefabs/Player/Agent/PlayerAgentChillGuy.prefab +++ b/Assets/Prefabs/Player/Agent/PlayerAgentChillGuy.prefab @@ -98,6 +98,7 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 4294967295 _cameraCollisionRadius: 0.15 + _cameraDistanceSmoothing: 10 _moveSpeed: 6 _upGravity: -18 _downGravity: -25 @@ -319,9 +320,9 @@ MonoBehaviour: Animator: {fileID: 974963880304834017} ApplyTiming: 2 SyncSettings: 79 - StateHashes: 000000002b1a167c79406955 + StateHashes: 00000000a1f7ab0dbb6691e728a981077af3fe2e TriggerHashes: 00000000 - TotalWords: 1 + TotalWords: 2 --- !u!1 &504059032653147225 GameObject: m_ObjectHideFlags: 0 @@ -586,7 +587,6 @@ Transform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 6249603782933705366} - {fileID: 6592586564576162323} - {fileID: 5401675310905547977} - {fileID: 6023693924253656717} @@ -648,12 +648,12 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7344887465434541220} serializedVersion: 2 - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -0.145, y: 1.169, z: 0.343} + m_LocalRotation: {x: 0.06344987, y: -0.03452537, z: -0.0071152984, w: 0.99736226} + m_LocalPosition: {x: -0.14788851, y: -0.15237403, z: 0.36819527} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 1361410190923505787} + m_Father: {fileID: 5426395098211334738} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &3015082363744815592 PrefabInstance: @@ -800,7 +800,10 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] - m_AddedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: -7520100684144184798, guid: 46859b6b0e7c1724baa344e726eefc6d, type: 3} + insertIndex: -1 + addedObject: {fileID: 6249603782933705366} m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 46859b6b0e7c1724baa344e726eefc6d, type: 3} --- !u!95 &974963880304834017 stripped @@ -808,6 +811,11 @@ Animator: m_CorrespondingSourceObject: {fileID: 5866666021909216657, guid: 46859b6b0e7c1724baa344e726eefc6d, type: 3} m_PrefabInstance: {fileID: 6696098184187824240} m_PrefabAsset: {fileID: 0} +--- !u!4 &5426395098211334738 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -7520100684144184798, guid: 46859b6b0e7c1724baa344e726eefc6d, type: 3} + m_PrefabInstance: {fileID: 6696098184187824240} + m_PrefabAsset: {fileID: 0} --- !u!4 &6586488819696676763 stripped Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 46859b6b0e7c1724baa344e726eefc6d, type: 3} diff --git a/Assets/Scripts/Player/PlayerAgent.cs b/Assets/Scripts/Player/PlayerAgent.cs index 36a7f87..dd9edcd 100644 --- a/Assets/Scripts/Player/PlayerAgent.cs +++ b/Assets/Scripts/Player/PlayerAgent.cs @@ -52,7 +52,10 @@ namespace Projectiles [SerializeField] public float _groundDeceleration = 25f; [SerializeField] public float _airAcceleration = 25f; [SerializeField] public float _airDeceleration = 1.3f; - + private Animator _anim; + private NetworkMecanimAnimator _netAnim; + private static readonly int HashMoveX = Animator.StringToHash("InputX"); // or "MoveX" + private static readonly int HashMoveY = Animator.StringToHash("InputY"); // or "MoveY" [Header("Character Facing")] [SerializeField] private float _turnSpeed = 720f; // deg/sec turning toward desired facing [SerializeField] private bool _faceMoveDirection = true; // if false, faces camera forward (aiming) @@ -74,6 +77,8 @@ namespace Projectiles // Only local player needs networked props replicated (bandwidth saver) ReplicateToAll(false); ReplicateTo(Object.InputAuthority, true); + _anim = GetComponentInChildren(); // your mesh/visual Animator + _netAnim = GetComponent(); } public override void Despawned(NetworkRunner runner, bool hasState) @@ -190,7 +195,13 @@ namespace Projectiles Vector3 inputDir = (camForward * input.MoveDirection.y + camRight * input.MoveDirection.x); inputDir.y = 0f; if (inputDir.sqrMagnitude > 1f) inputDir.Normalize(); - + float moveX = Vector3.Dot(inputDir, camRight); + float moveY = Vector3.Dot(inputDir, camForward); + + const float damp = 0.1f; // seconds to smooth toward target + _anim.SetFloat(HashMoveX, moveX, damp, Time.deltaTime); + _anim.SetFloat(HashMoveY, moveY, damp, Time.deltaTime); + // Desired velocity and acceleration/deceleration Vector3 desiredVel = inputDir * _moveSpeed; float accel = 1f; diff --git a/Assets/Scripts/Player/PlayerBody.cs b/Assets/Scripts/Player/PlayerBody.cs index baafcd8..0ef5fab 100644 --- a/Assets/Scripts/Player/PlayerBody.cs +++ b/Assets/Scripts/Player/PlayerBody.cs @@ -36,12 +36,12 @@ namespace Projectiles _root.SetActive(_agent.Health.IsAlive); _agent.Health.FatalHitTaken += OnFatalHit; - // Disable visual for local player - var renderers = _visual.GetComponentsInChildren(); - for (int i = 0; i < renderers.Length; i++) - { - renderers[i].shadowCastingMode = HasInputAuthority ? ShadowCastingMode.ShadowsOnly : ShadowCastingMode.On; - } + // // Disable visual for local player + // var renderers = _visual.GetComponentsInChildren(); + // for (int i = 0; i < renderers.Length; i++) + // { + // renderers[i].shadowCastingMode = HasInputAuthority ? ShadowCastingMode.ShadowsOnly : ShadowCastingMode.On; + // } } public override void FixedUpdateNetwork()