浏览代码

Three raycasts

/main
Ciro Continisio 3 年前
当前提交
f3bd8b00
共有 7 个文件被更改,包括 1428 次插入497 次删除
  1. 215
      UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab
  2. 620
      UOP1_Project/Assets/Scenes/WIP/TestingGround_Small.unity
  3. 25
      UOP1_Project/Assets/Scenes/WIP/TestingGround_Small/LightingData.asset
  4. 1001
      UOP1_Project/Assets/Scenes/WIP/TestingGround_Small/Lightmap-0_comp_light.exr
  5. 1
      UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Mountain_Path.asset
  6. 50
      UOP1_Project/Assets/Scripts/Characters/Protagonist.cs
  7. 13
      UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs

215
UOP1_Project/Assets/Prefabs/Characters/PigChef.prefab


m_Enabled: 1
serializedVersion: 2
m_Height: 1.3
m_Radius: 0.3
m_Radius: 0.25
m_SlopeLimit: 45
m_StepOffset: 0.25
m_SkinWidth: 0.02

gameplayCameraTransform: {fileID: 11400000, guid: bc205269957643647a8b5f98f028f9fb,
type: 2}
_openInventoryChannel: {fileID: 0}
ray1: {fileID: 5986570136067168862}
ray2: {fileID: 6950735986475152375}
ray3: {fileID: 6171081068863781697}
--- !u!114 &6243045328629046901
MonoBehaviour:
m_ObjectHideFlags: 0

m_Father: {fileID: 7980046698497209273}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2404603671596265661
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6950735986475152375}
m_Layer: 0
m_Name: Ray (2)
m_TagString: Untagged
m_Icon: {fileID: 7866945982896999795, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6950735986475152375
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2404603671596265661}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: 0.242, y: 0.2954, z: -0.144}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1083073290189785667}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2561880875395320411
GameObject:
m_ObjectHideFlags: 0

_layers:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &3716520544714381952
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5986570136067168862}
m_Layer: 0
m_Name: Ray (1)
m_TagString: Untagged
m_Icon: {fileID: 7866945982896999795, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5986570136067168862
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3716520544714381952}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: 0.004, y: 0.2954, z: 0.278}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1083073290189785667}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &4068522191893200351
GameObject:
m_ObjectHideFlags: 0

m_MaintainTargetRotationOffset: 0
m_SourceObjectsGUIToggle: 1
m_SettingsGUIToggle: 1
--- !u!1 &5628147311454600911
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6171081068863781697}
m_Layer: 0
m_Name: Ray (3)
m_TagString: Untagged
m_Icon: {fileID: 7866945982896999795, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6171081068863781697
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5628147311454600911}
m_LocalRotation: {x: -0, y: -1, z: -0, w: 0}
m_LocalPosition: {x: -0.207, y: 0.2954, z: -0.199}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1083073290189785667}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6174286042992265391
GameObject:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c478a391cfbc4b74ebda3f9a57283705, type: 3}
--- !u!4 &9124457888259134664 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -707639030120515232, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3618315963565927926 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4232177642318348382, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &985740358872296520 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 370260214279946720, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6915316659346450001 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6302017792269552633, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1923828950100165288 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -7908408724013584640, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5715074524044649684 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5178407201426131324, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5745820188237013370 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -4093735697823429422, guid: c478a391cfbc4b74ebda3f9a57283705,

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5700738674217691736 stripped
--- !u!4 &6283366920650448094 stripped
m_CorrespondingSourceObject: {fileID: 5156753003295213552, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: -2324313729559432842, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2153411342994507478 stripped
--- !u!4 &8613994902604584134 stripped
m_CorrespondingSourceObject: {fileID: 1544475338635520894, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8613994902604584134 stripped
--- !u!4 &5700738674217691736 stripped
m_CorrespondingSourceObject: {fileID: 9153124993310210414, guid: c478a391cfbc4b74ebda3f9a57283705,
m_CorrespondingSourceObject: {fileID: 5156753003295213552, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6283366920650448094 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -2324313729559432842, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &7646398735186508214 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -2121169907620178914, guid: c478a391cfbc4b74ebda3f9a57283705,

--- !u!4 &928224351994020785 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 318866306700684825, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &2153411342994507478 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1544475338635520894, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}

type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &9124457888259134664 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -707639030120515232, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3618315963565927926 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 4232177642318348382, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &985740358872296520 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 370260214279946720, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &6915316659346450001 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6302017792269552633, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &1923828950100165288 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -7908408724013584640, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!4 &5715074524044649684 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5178407201426131324, guid: c478a391cfbc4b74ebda3f9a57283705,
type: 3}
m_PrefabInstance: {fileID: 616254372594363816}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &2046901735864851427
PrefabInstance:
m_ObjectHideFlags: 0

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 5bf7aeff6af6cad4ba9c19219c9841db, type: 3}
--- !u!4 &3583992150622067535 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3346050453518178618, guid: 5bf7aeff6af6cad4ba9c19219c9841db,
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}
--- !u!4 &3583992150622067535 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3346050453518178618, guid: 5bf7aeff6af6cad4ba9c19219c9841db,
type: 3}
m_PrefabInstance: {fileID: 2293294246731547253}
m_PrefabAsset: {fileID: 0}

objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a75f6395e1487b344a0ffafad66fc95a, type: 3}
--- !u!198 &2152090768827979840 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 5197471990935564586, guid: a75f6395e1487b344a0ffafad66fc95a,
type: 3}
m_PrefabInstance: {fileID: 6196075796933781866}
m_PrefabAsset: {fileID: 0}
type: 3}
m_PrefabInstance: {fileID: 6196075796933781866}
m_PrefabAsset: {fileID: 0}
--- !u!198 &2152090768827979840 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 5197471990935564586, guid: a75f6395e1487b344a0ffafad66fc95a,
type: 3}
m_PrefabInstance: {fileID: 6196075796933781866}
m_PrefabAsset: {fileID: 0}

620
UOP1_Project/Assets/Scenes/WIP/TestingGround_Small.unity


objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e978d53d440e0814086759404585ac32, type: 3}
--- !u!1001 &218741863
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_Name
value: Rock_Proto (8)
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 19
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.x
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.x
value: -7.429
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.2785542
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.63
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.20620416
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.43877855
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.8168101
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.3126893
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -19.26
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 139.646
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 63.624
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!1 &242133391
GameObject:
m_ObjectHideFlags: 0

m_Father: {fileID: 1343018183}
m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: -8.205, z: 0}
--- !u!1001 &314637021
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_Name
value: Rock_Proto (7)
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 18
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.x
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.x
value: -5.451
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.7517872
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.z
value: -0.22977376
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.9486423
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.26746505
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.14071059
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.0934917
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 28.76
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -21.198
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -16.75
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!1 &314708499
GameObject:
m_ObjectHideFlags: 0

- target: {fileID: 8791488512559450803, guid: 8cd2f4ad3ae032047aaaf5fe0254cb18,
type: 3}
propertyPath: m_BoundingSphereOverride.w
value: 2.247402e-12
value: 0
value: 8.97e-43
value: 4.1272295e+30
value: 7.1e-44
value: 1.3684156e-18
value: 0
value: 4.5904e-41
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8cd2f4ad3ae032047aaaf5fe0254cb18, type: 3}

m_Father: {fileID: 1343018183}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: -157.112, z: 32.13}
--- !u!1001 &1361120323
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_Name
value: Rock_Proto (10)
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 21
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.x
value: 2.355899
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 2.355899
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 2.355899
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.x
value: -11.026199
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.36753416
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.z
value: 3.8790164
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.w
value: -0.4080347
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.01615086
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.9097341
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.0750385
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -8.61
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 228.453
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -1.846
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!1 &1366387105
GameObject:
m_ObjectHideFlags: 0

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1599361239}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &1656028185
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_Name
value: Rock_Proto (5)
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 16
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.x
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.x
value: -6.568
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.915
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.z
value: 1.717
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.98495364
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.03641826
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.16260509
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.045822717
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -4.97
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -18.553
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -4.515
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!1001 &1810604289
PrefabInstance:
m_ObjectHideFlags: 0

- target: {fileID: 463132372906762298, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_FollowOffset.y
value: 4.532291
value: 4.093733
value: -8.847359
value: -8.60862
value: 4.532291
value: 4.093733
value: -8.847359
value: -8.60862
objectReference: {fileID: 0}
- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}

- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.08910289
value: -0.089102894
objectReference: {fileID: 0}
- target: {fileID: 1657732992883833910, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}

- target: {fileID: 2678045054851453813, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_FollowOffset.y
value: 4.532291
value: 4.093733
value: -8.847359
value: -8.60862
objectReference: {fileID: 0}
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}

- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.10224989
value: 0.102249905
value: -0.08917597
value: -0.08917595
value: 0.024490183
value: 0.024490178
objectReference: {fileID: 0}
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}

- target: {fileID: 8745341642014614482, guid: 45632f0a227c860489bcba0eb1f4ec3e,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.000000036972832
value: -0.000000039006572
value: 0.0000000070498003
value: 0.000000007437584
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 45632f0a227c860489bcba0eb1f4ec3e, type: 3}

m_Father: {fileID: 1343018183}
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: -8.205, z: 0}
--- !u!1001 &1876773641
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_Name
value: Rock_Proto (9)
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 20
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.x
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.x
value: -9.344
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.2785542
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.z
value: 1.152
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.20620416
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.43877855
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.y
value: 0.8168101
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.3126893
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -19.26
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 139.646
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 63.624
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!1001 &1916692731
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_Name
value: Rock_Proto (6)
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 17
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.x
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.x
value: -4.6
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.y
value: -1.915
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.z
value: 1.343
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.98495364
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.03641826
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.16260509
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.045822717
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -4.97
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -18.553
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -4.515
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!1001 &1965089118
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 356351537346561497, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_Name
value: Rock_Proto (4)
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_RootOrder
value: 15
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.x
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.y
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalScale.z
value: 1.4379467
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.x
value: -7.6573515
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.y
value: -2.0967088
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalPosition.z
value: 2.7713225
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.98495364
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.03641826
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.16260509
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalRotation.z
value: -0.045822717
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -4.97
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: -18.553
objectReference: {fileID: 0}
- target: {fileID: 1133169299314483043, guid: 28841731d776e9e47a8324c9a7041593,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -4.515
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 28841731d776e9e47a8324c9a7041593, type: 3}
--- !u!1 &2040702399
GameObject:
m_ObjectHideFlags: 0

25
UOP1_Project/Assets/Scenes/WIP/TestingGround_Small/LightingData.asset
文件差异内容过多而无法显示
查看文件

1001
UOP1_Project/Assets/Scenes/WIP/TestingGround_Small/Lightmap-0_comp_light.exr
文件差异内容过多而无法显示
查看文件

1
UOP1_Project/Assets/ScriptableObjects/SceneData/Locations/Mountain_Path.asset


m_KeyId: 0
m_Key:
m_FallbackState: 0
m_WaitForCompletion: 1

50
UOP1_Project/Assets/Scripts/Characters/Protagonist.cs


public const float GRAVITY_DIVIDER = .6f;
public const float AIR_RESISTANCE = 5f;
public Transform ray1, ray2, ray3; //Temporary references
//private void OnControllerColliderHit(ControllerColliderHit hit)
//{
// lastHit = hit;

private void GroundCheck()
{
Ray ray = new Ray(transform.position + Vector3.up * .3f + transform.forward * .3f, Vector3.down);
Ray sphereRay = new Ray(transform.position + Vector3.up * .3f, Vector3.down);
bool rayFoundGround = Physics.Raycast(ray, out RaycastHit hitResults, .2f);
if (rayFoundGround)
{
rayGroundNormal = hitResults.normal;
}
else
rayGroundNormal = Vector3.zero;
if(Physics.Raycast(ray1.position, Vector3.down, out RaycastHit hitResults, 1f))
//This is a "safe" value, in case the character is in the air or other edge cases,
//and some script uses the ground normal for calculations.
rayGroundNormal = Vector3.up;
rayGroundNormal += hitResults.normal;
if (Physics.SphereCast(sphereRay, .3f, out hitResults, 1f))
if (Physics.Raycast(ray2.position, Vector3.down, out hitResults, 1f))
spherecastGroundNormal = hitResults.normal;
if(!rayFoundGround)
{
rayGroundNormal = spherecastGroundNormal;
}
rayGroundNormal += hitResults.normal;
else
if (Physics.Raycast(ray3.position, Vector3.down, out hitResults, 1f))
spherecastGroundNormal = Vector3.up;
rayGroundNormal += hitResults.normal;
rayGroundNormal.Normalize();
//Ray sphereRay = new Ray(transform.position + Vector3.up * .3f, Vector3.down);
//if (Physics.SphereCast(sphereRay, .3f, out hitResults, 1f))
//{
// spherecastGroundNormal = hitResults.normal;
// if(!rayFoundGround)
// {
// rayGroundNormal = spherecastGroundNormal;
// }
//}
//else
//{
// spherecastGroundNormal = Vector3.up;
//}
Debug.DrawLine(origin, origin + spherecastGroundNormal, Color.green);
//Debug.DrawLine(origin, origin + spherecastGroundNormal, Color.green);
}
private void RecalculateMovement()

13
UOP1_Project/Assets/Scripts/Characters/StateMachine/Conditions/IsSlidingConditionSO.cs


protected override bool Statement()
{
float raycastSlope = Vector3.Angle(Vector3.up, _protagonistScript.rayGroundNormal);
if (raycastSlope >= _characterController.slopeLimit)
{
float spherecastSlope = Vector3.Angle(Vector3.up, _protagonistScript.spherecastGroundNormal);
return spherecastSlope >= _characterController.slopeLimit;
}
else
{
return false;
}
float slope = Vector3.Angle(Vector3.up, _protagonistScript.rayGroundNormal);
Debug.Log(slope);
return slope >= _characterController.slopeLimit;
}
}
正在加载...
取消
保存