Neck Control

Added a neck feature to the player camera
This commit is contained in:
juliuse98
2021-10-19 08:56:05 +02:00
parent c1af73f04c
commit 9168a4aa8b
12 changed files with 1105 additions and 18 deletions

BIN
Assets/Objects/Human.blend Normal file

Binary file not shown.

View File

@@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 94eb43ab67867914c9ac3de46caa4c67
ModelImporter:
serializedVersion: 21100
internalIDToNameTable:
- first:
74: -623603649343465320
second: Scene
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Objects/Human.blend1 Normal file

Binary file not shown.

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9756c92c8fdab5b4185d547216209d30
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Objects/Human.fbx Normal file

Binary file not shown.

View File

@@ -0,0 +1,402 @@
fileFormatVersion: 2
guid: 25ca9c9cd2d467c4e9b7c7759baa0db2
ModelImporter:
serializedVersion: 21100
internalIDToNameTable:
- first:
74: 8349542763059015795
second: Armature|Walk
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 3
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: Armature|Walk
takeName: Armature|Walk
internalID: 0
firstFrame: 0
lastFrame: 24
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: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human:
- boneName: Hip
humanName: Hips
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Thigh_L
humanName: LeftUpperLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Thigh_R
humanName: RightUpperLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Shin_L
humanName: LeftLowerLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Shin_R
humanName: RightLowerLeg
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Foot_L
humanName: LeftFoot
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Foot_R
humanName: RightFoot
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Abdomen
humanName: Spine
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Chest
humanName: Chest
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Head
humanName: Head
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: UpperArm_L
humanName: LeftUpperArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: UpperArm_R
humanName: RightUpperArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Forearm_L
humanName: LeftLowerArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Forearm_R
humanName: RightLowerArm
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Hand_L
humanName: LeftHand
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
- boneName: Hand_R
humanName: RightHand
limit:
min: {x: 0, y: 0, z: 0}
max: {x: 0, y: 0, z: 0}
value: {x: 0, y: 0, z: 0}
length: 0
modified: 0
skeleton:
- name: Human(Clone)
parentName:
position: {x: 0, y: 0, z: 0}
rotation: {x: 0, y: 0, z: 0, w: 1}
scale: {x: 1, y: 1, z: 1}
- name: Cube
parentName: Human(Clone)
position: {x: -0, y: 0, z: 0}
rotation: {x: -0.7071067, y: -0.000000030908616, z: 0.000000030908623, w: 0.7071068}
scale: {x: 100, y: 100, z: 100}
- name: Armature
parentName: Human(Clone)
position: {x: -0, y: 0, z: 0}
rotation: {x: -0.7071067, y: -0.000000030908616, z: 0.000000030908623, w: 0.7071068}
scale: {x: 100, y: 100, z: 100}
- name: Hip
parentName: Armature
position: {x: 7.948426e-10, y: 0.0000000017881393, z: 0.008924431}
rotation: {x: 0.7071068, y: -0.0000000020579487, z: -0.0000000020579605, w: 0.7071068}
scale: {x: 1, y: 1, z: 1}
- name: Abdomen
parentName: Hip
position: {x: -0, y: 0.0010998978, z: 0}
rotation: {x: -0, y: -0.000000116415315, z: 7.1054274e-15, w: 1}
scale: {x: 0.9999999, y: 1, z: 0.9999999}
- name: Chest
parentName: Abdomen
position: {x: -0, y: 0.002230785, z: 0}
rotation: {x: -0, y: -0, z: -0, w: 1}
scale: {x: 1, y: 0.9999999, z: 0.99999994}
- name: Head
parentName: Chest
position: {x: -0, y: 0.002965438, z: 0}
rotation: {x: -1.6584554e-17, y: 1.1934986e-10, z: -1.4246027e-10, w: 1}
scale: {x: 0.99999994, y: 0.9999998, z: 0.99999994}
- name: UpperArm_L
parentName: Chest
position: {x: -0.0013659928, y: 0.0018180575, z: -0.00022726202}
rotation: {x: -0.4864988, y: 0.46149784, z: 0.5357424, w: 0.51314586}
scale: {x: 0.99999976, y: 0.9999995, z: 1}
- name: Forearm_L
parentName: UpperArm_L
position: {x: -9.313225e-11, y: 0.0029282072, z: -7.4505804e-11}
rotation: {x: -0.009157031, y: -0.09181186, z: -0.038012516, w: -0.99500847}
scale: {x: 1.0000002, y: 0.9999999, z: 0.99999976}
- name: Hand_L
parentName: Forearm_L
position: {x: -1.3038516e-10, y: 0.0018045367, z: -5.820766e-11}
rotation: {x: 0.09934627, y: 0.7378955, z: -0.010978944, w: -0.667473}
scale: {x: 1.0000004, y: 1.0000006, z: 0.99999994}
- name: UpperArm_R
parentName: Chest
position: {x: 0.0013659928, y: 0.0018180575, z: -0.00022726262}
rotation: {x: 0.486499, y: 0.4614976, z: 0.53574234, w: -0.51314604}
scale: {x: 1.0000004, y: 1.0000004, z: 0.9999998}
- name: Forearm_R
parentName: UpperArm_R
position: {x: 1.8626451e-11, y: 0.002928207, z: -5.401671e-10}
rotation: {x: 0.009157239, y: -0.09181183, z: -0.038012635, w: 0.99500847}
scale: {x: 1.0000006, y: 1.0000002, z: 1.0000002}
- name: Hand_R
parentName: Forearm_R
position: {x: -7.4505804e-11, y: 0.0018045371, z: -5.3551046e-11}
rotation: {x: -0.09934638, y: 0.73789537, z: -0.010979169, w: 0.66747296}
scale: {x: 0.9999997, y: 0.9999999, z: 0.99999976}
- name: Thigh_L
parentName: Hip
position: {x: -0.00069675926, y: -0.00007037975, z: -0.00040403535}
rotation: {x: 0.7066821, y: -0.08031961, z: -0.70253026, w: -0.024505584}
scale: {x: 1.000001, y: 1, z: 1.0000001}
- name: Shin_L
parentName: Thigh_L
position: {x: -1.5366822e-10, y: 0.003972938, z: -1.6298145e-11}
rotation: {x: -0.00014329328, y: 0.008907664, z: 0.05948525, w: -0.9981895}
scale: {x: 1.0000004, y: 1.0000004, z: 1}
- name: Foot_L
parentName: Shin_L
position: {x: -2.3283064e-12, y: 0.0039656768, z: 1.36788e-10}
rotation: {x: 0.45208237, y: -0.604719, z: -0.36648977, w: -0.54371107}
scale: {x: 0.9999999, y: 1.0000004, z: 0.9999999}
- name: Thigh_R
parentName: Hip
position: {x: 0.00069675926, y: -0.00007037975, z: -0.00040403544}
rotation: {x: 0.70668215, y: 0.080319576, z: 0.7025302, w: -0.024505673}
scale: {x: 1.000001, y: 1.0000001, z: 1.0000005}
- name: Shin_R
parentName: Thigh_R
position: {x: -8.8475643e-11, y: 0.003972937, z: 2.2933817e-10}
rotation: {x: 0.00014321505, y: 0.008907782, z: 0.059485234, w: 0.9981895}
scale: {x: 1.0000005, y: 1.0000004, z: 1.0000005}
- name: Foot_R
parentName: Shin_R
position: {x: 3.7252902e-11, y: 0.003965677, z: -3.259629e-11}
rotation: {x: -0.45208243, y: -0.604719, z: -0.36648992, w: 0.54371107}
scale: {x: 0.99999964, y: 0.99999946, z: 1.0000005}
- name: Foot_Control_L
parentName: Armature
position: {x: -0.0013605166, y: -0.0016545627, z: -0.007761089}
rotation: {x: 0.999981, y: -3.552714e-15, z: 1.0658142e-14, w: 0.006168336}
scale: {x: 1, y: 0.99999994, z: 1.000678}
- name: Thigh_Control_L
parentName: Armature
position: {x: -0.00093339814, y: -0.006269274, z: -0.0039872816}
rotation: {x: 0.98892564, y: -0.000000008188669, z: -0.14841183, w: -8.881784e-16}
scale: {x: 1, y: 1, z: 0.99999994}
- name: UpperArm_Control_L
parentName: Armature
position: {x: -0.00085530936, y: -0.0039713676, z: 0.003075037}
rotation: {x: -0.2692533, y: -0.6538369, z: 0.6538369, w: 0.2692533}
scale: {x: 0.72619903, y: 0.99999976, z: 0.7314929}
- name: Hand_L.001
parentName: Armature
position: {x: -0.0022795226, y: -0.00026142012, z: 0.0010587472}
rotation: {x: 0.00009068196, y: -0.7071068, z: 0.7071068, w: 0.00009159633}
scale: {x: 0.48980606, y: 0.99999964, z: 0.9999998}
- name: Foot_Control_R
parentName: Armature
position: {x: 0.0013605207, y: 0.0031248948, z: -0.0069798133}
rotation: {x: 0.999981, y: -0.000000025788854, z: -0.000004175075, w: 0.006168336}
scale: {x: 1, y: 0.99999994, z: 1.000678}
- name: Thigh_Control_R
parentName: Armature
position: {x: 0.00093339814, y: -0.006269274, z: -0.0039872816}
rotation: {x: 0.98892564, y: -0.000000008188669, z: 0.14841184, w: 1.5543122e-15}
scale: {x: 1, y: 1, z: 1.0000001}
- name: UpperArm_Control_R
parentName: Armature
position: {x: 0.00085530936, y: -0.0039713676, z: 0.003075037}
rotation: {x: 0.2692533, y: -0.6538369, z: 0.6538369, w: -0.2692533}
scale: {x: 0.72619903, y: 0.99999976, z: 0.7314929}
- name: Hand_R.001
parentName: Armature
position: {x: 0.0022795226, y: -0.00026142012, z: 0.0010587472}
rotation: {x: -0.000090681955, y: -0.7071068, z: 0.7071068, w: -0.000091596325}
scale: {x: 0.48980606, y: 0.99999964, z: 0.9999998}
- name: LookAt
parentName: Armature
position: {x: -0, y: -0.0037967255, z: 0.0062961215}
rotation: {x: 0.7071068, y: -0.00000008429373, z: -0.000000084293724, w: 0.7071068}
scale: {x: 1, y: 0.9999998, z: 0.9999998}
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: 1
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 3
humanoidOversampling: 1
avatarSetup: 1
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,122 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!206 &-7127493751781251651
BlendTree:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blend Tree
m_Childs: []
m_BlendParameter: Blend
m_BlendParameterY: Blend
m_MinThreshold: 0
m_MaxThreshold: 1
m_UseAutomaticThresholds: 1
m_NormalizedBlendValues: 0
m_BlendType: 0
--- !u!1102 &-1129337770131920209
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Armature|Walk
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: 8349542763059015795, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1107 &-29801462378204144
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: -1129337770131920209}
m_Position: {x: 240, y: 70, z: 0}
- serializedVersion: 1
m_State: {fileID: 1753614070743940096}
m_Position: {x: 130, y: 180, 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: -1129337770131920209}
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: HumanAnimationControler
serializedVersion: 5
m_AnimatorParameters:
- m_Name: Blend
m_Type: 1
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 0}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -29801462378204144}
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!1102 &1753614070743940096
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Blend Tree
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: -7127493751781251651}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bcfd120671431f84097ebc1045370f76
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 9100000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -273,7 +273,7 @@ RectTransform:
- {fileID: 857589337} - {fileID: 857589337}
- {fileID: 1982097595} - {fileID: 1982097595}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 4 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
@@ -349,7 +349,12 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
playerCamera: {fileID: 963194228} playerCamera: {fileID: 963194228}
playerNeck: {fileID: 2101807700}
mouseSensitivity: 4 mouseSensitivity: 4
maxCameraAngle: 90
neckStartAngle: 15
minCameraAngle: -75
neckLength: 0.3
mouseSmoothTime: 0 mouseSmoothTime: 0
lockCursor: 1 lockCursor: 1
walkSpeed: 6 walkSpeed: 6
@@ -388,13 +393,14 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 340159597} m_GameObject: {fileID: 340159597}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2.15, z: 0} m_LocalPosition: {x: -72.6, y: 23.9, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 963194228} - {fileID: 2101807700}
- {fileID: 1473696487} - {fileID: 1473696487}
- {fileID: 1977358394}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 3 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &450235891 stripped --- !u!1 &450235891 stripped
GameObject: GameObject:
@@ -563,7 +569,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &739500445 --- !u!1001 &739500445
PrefabInstance: PrefabInstance:
@@ -574,7 +580,7 @@ PrefabInstance:
m_Modifications: m_Modifications:
- target: {fileID: -8679921383154817045, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3} - target: {fileID: -8679921383154817045, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 1 value: 3
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3} - target: {fileID: -8679921383154817045, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
@@ -696,6 +702,10 @@ PrefabInstance:
propertyPath: m_Layer propertyPath: m_Layer
value: 6 value: 6
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2550463727306718371, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3} - target: {fileID: 2550463727306718371, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
propertyPath: m_Layer propertyPath: m_Layer
value: 6 value: 6
@@ -924,13 +934,13 @@ Transform:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225} m_GameObject: {fileID: 963194225}
m_LocalRotation: {x: -0, y: -0.67557263, z: -0, w: 0.7372934} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 2, z: 0} m_LocalPosition: {x: 0, y: 0.17900002, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 340159600} m_Father: {fileID: 2101807700}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: -84.997, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1035340512 stripped --- !u!1 &1035340512 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: -208595431880416365, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3} m_CorrespondingSourceObject: {fileID: -208595431880416365, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
@@ -950,6 +960,133 @@ MeshCollider:
m_Convex: 0 m_Convex: 0
m_CookingOptions: 30 m_CookingOptions: 30
m_Mesh: {fileID: -3329902420748629119, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3} m_Mesh: {fileID: -3329902420748629119, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
--- !u!1 &1050393734
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1050393735}
- component: {fileID: 1050393738}
- component: {fileID: 1050393737}
- component: {fileID: 1050393736}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1050393735
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1050393734}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 1, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1054728265}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &1050393736
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1050393734}
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 &1050393737
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1050393734}
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: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10303, 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: 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 &1050393738
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1050393734}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1054728264
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1054728265}
m_Layer: 0
m_Name: thing
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1054728265
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1054728264}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1050393735}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1067101116 --- !u!1 &1067101116
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -978,8 +1115,27 @@ Transform:
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1079857658 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
m_PrefabInstance: {fileID: 1971713454}
m_PrefabAsset: {fileID: 0}
--- !u!64 &1079857662
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1079857658}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 4
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 4579454407841743219, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
--- !u!1 &1111479331 stripped --- !u!1 &1111479331 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 2550463727306718371, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3} m_CorrespondingSourceObject: {fileID: 2550463727306718371, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
@@ -1063,8 +1219,69 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 5 m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1260676680
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 340159600}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_RootOrder
value: 3
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalPosition.y
value: 1.2
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_Name
value: Human
objectReference: {fileID: 0}
- target: {fileID: 5866666021909216657, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: bcfd120671431f84097ebc1045370f76, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
--- !u!1 &1472173275 stripped --- !u!1 &1472173275 stripped
GameObject: GameObject:
m_CorrespondingSourceObject: {fileID: 8416272007918961125, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3} m_CorrespondingSourceObject: {fileID: 8416272007918961125, guid: 823e8b39d52b71b4eb5a91dbc8d6d59e, type: 3}
@@ -1286,6 +1503,72 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1960893053} m_GameObject: {fileID: 1960893053}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1001 &1971713454
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalPosition.x
value: -93
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalPosition.y
value: 15.230316
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalPosition.z
value: 23.836697
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_Name
value: Dirt2
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
propertyPath: m_Layer
value: 6
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 95368b38c2191b9459eb8538ea67a64b, type: 3}
--- !u!4 &1977358394 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 25ca9c9cd2d467c4e9b7c7759baa0db2, type: 3}
m_PrefabInstance: {fileID: 1260676680}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1982097592 --- !u!1 &1982097592
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1420,6 +1703,37 @@ RectTransform:
m_AnchoredPosition: {x: 5.3916016, y: -17.471985} m_AnchoredPosition: {x: 5.3916016, y: -17.471985}
m_SizeDelta: {x: 88.783295, y: 28.615997} m_SizeDelta: {x: 88.783295, y: 28.615997}
m_Pivot: {x: 1, y: 1} m_Pivot: {x: 1, y: 1}
--- !u!1 &2101807699
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2101807700}
m_Layer: 0
m_Name: Neck
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2101807700
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2101807699}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.772, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 963194228}
m_Father: {fileID: 340159600}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2119583729 --- !u!1 &2119583729
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -1514,5 +1828,5 @@ Transform:
m_LocalScale: {x: 4.6584, y: 1, z: 14.388176} m_LocalScale: {x: 4.6584, y: 1, z: 14.388176}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 6 m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

BIN
Assets/Scripts/Dirt2.fbx Normal file

Binary file not shown.

View File

@@ -0,0 +1,102 @@
fileFormatVersion: 2
guid: 95368b38c2191b9459eb8538ea67a64b
ModelImporter:
serializedVersion: 21100
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
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
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
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
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -9,7 +9,14 @@ public class PlayerController : MonoBehaviour
{ {
[Header("Mouse Look")] [Header("Mouse Look")]
[SerializeField] private Transform playerCamera = null; [SerializeField] private Transform playerCamera = null;
[SerializeField] private Transform playerNeck = null;
[SerializeField] private float mouseSensitivity = 4.0f; [SerializeField] private float mouseSensitivity = 4.0f;
[SerializeField] private float maxCameraAngle = -90f;
[SerializeField] private float neckStartAngle = 0f;
[SerializeField] private float minCameraAngle = 90f;
[SerializeField] private float neckLength = 0.2f;
[SerializeField] [Range(0.0f, 0.5f)] private float mouseSmoothTime = 0.001f; [SerializeField] [Range(0.0f, 0.5f)] private float mouseSmoothTime = 0.001f;
[SerializeField] private bool lockCursor = true; [SerializeField] private bool lockCursor = true;
@@ -25,8 +32,9 @@ public class PlayerController : MonoBehaviour
[SerializeField] private LayerMask groundMask; [SerializeField] private LayerMask groundMask;
public bool isGrounded; public bool isGrounded;
private float fullPitch = 0f;
private float cameraPitch = 0f; private float cameraPitch = 0f;
private float neckPitch = 0f;
private float velocityY = 0.0f; private float velocityY = 0.0f;
private CharacterController controller; private CharacterController controller;
@@ -62,13 +70,32 @@ public class PlayerController : MonoBehaviour
Vector2 targetMouseDelta = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y")); //Get the axis of the mouse Vector2 targetMouseDelta = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y")); //Get the axis of the mouse
currentMouseDelta = Vector2.SmoothDamp(currentMouseDelta, targetMouseDelta, ref currentMouseDeltaVelocity, mouseSmoothTime); currentMouseDelta = Vector2.SmoothDamp(currentMouseDelta, targetMouseDelta, ref currentMouseDeltaVelocity, mouseSmoothTime);
fullPitch -= currentMouseDelta.y * mouseSensitivity;
fullPitch = Mathf.Clamp(fullPitch,-maxCameraAngle,-minCameraAngle);
//cameraPitch = Mathf.Clamp(fullPitch, -90, 45);
cameraPitch -= currentMouseDelta.y * mouseSensitivity; //minus, weil der rotation wert inverted ist //neckPitch = Mathf.Clamp(fullPitch, 45, 90);
cameraPitch = Mathf.Clamp(cameraPitch, -90.0f, 90.0f); Debug.Log("fullPitch: " + fullPitch);
playerCamera.localEulerAngles = Vector3.right * cameraPitch; if (fullPitch >= neckStartAngle) {
playerNeck.localEulerAngles = Vector3.right * (fullPitch - neckStartAngle);
}
else {
playerCamera.localEulerAngles = Vector3.right * fullPitch;
transform.Rotate(Vector3.up * currentMouseDelta.x * mouseSensitivity); //Rotate the hole player if looked sideways
}
playerCamera.position = playerNeck.position;
playerCamera.position += playerNeck.up * neckLength;
/*
playerNeck.localEulerAngles = Vector3.right * neckPitch;
playerCamera.localEulerAngles = Vector3.right * cameraPitch;
playerCamera.position = playerNeck.position;
playerCamera.position += playerNeck.up * neckLength;*/
//playerCamera.RotateAround(playerNeck.position, Vector3.right, cameraPitch* Mathf.Deg2Rad - playerCamera.transform.rotation.x);
transform.Rotate(Vector3.up * currentMouseDelta.x * mouseSensitivity); //Rotate the hole player if looked sideways (Rotates the player left and right)
} }
private void UpdateMovement() private void UpdateMovement()
{ {