Sticking to the Ground

This commit is contained in:
_Redstone_c_ 2021-02-08 11:11:15 +08:00
parent e300d8aef8
commit fa522d0a67
5 changed files with 2304 additions and 14 deletions

File diff suppressed because it is too large Load Diff

View File

@ -98,7 +98,7 @@ LightmapSettings:
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 0
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
@ -121,6 +121,213 @@ NavMeshSettings:
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1001 &58038928
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 19
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -19.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1001 &137482866
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 13
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -1.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1001 &154410382
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 20
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -22.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1 &165900425
GameObject:
m_ObjectHideFlags: 0
@ -2587,6 +2794,75 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!1001 &337696198
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 21
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -25.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1 &355268149
GameObject:
m_ObjectHideFlags: 0
@ -3543,6 +3819,75 @@ Mesh:
offset: 0
size: 0
path:
--- !u!1001 &418612239
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 22
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -28.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!43 &464871377
Mesh:
m_ObjectHideFlags: 0
@ -5774,6 +6119,75 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!1001 &827183741
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 15
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -7.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1 &963194225
GameObject:
m_ObjectHideFlags: 0
@ -5785,6 +6199,7 @@ GameObject:
- component: {fileID: 963194228}
- component: {fileID: 963194227}
- component: {fileID: 963194226}
- component: {fileID: 963194229}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
@ -5827,7 +6242,7 @@ Camera:
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 32.84
orthographic size: 10
m_Depth: -1
m_CullingMask:
serializedVersion: 2
@ -5850,13 +6265,182 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 100, z: -15}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -80}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &963194229
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 963194225}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_RenderPostProcessing: 0
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_Version: 2
--- !u!1001 &977504770
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 23
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -31.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1001 &1047358212
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 18
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -16.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1 &1300795614
GameObject:
m_ObjectHideFlags: 0
@ -6714,6 +7298,75 @@ Mesh:
offset: 0
size: 0
path:
--- !u!1001 &1330130246
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 17
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -13.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!1 &1347033848
GameObject:
m_ObjectHideFlags: 0
@ -8201,6 +8854,75 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
--- !u!1001 &1731673429
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 14
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -4.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!43 &1766618491
Mesh:
m_ObjectHideFlags: 0
@ -8364,6 +9086,75 @@ Mesh:
offset: 0
size: 0
path:
--- !u!1001 &1805995472
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_RootOrder
value: 16
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalPosition.z
value: -10.5
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720835, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6426552592410720839, guid: 3dd5393965472a4438e901f90d336e67,
type: 3}
propertyPath: m_Name
value: Sphere
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3dd5393965472a4438e901f90d336e67, type: 3}
--- !u!43 &2075215162
Mesh:
m_ObjectHideFlags: 0

View File

@ -17,6 +17,15 @@ public class MovingSphere : MonoBehaviour
[SerializeField, Range(0f, 90f)]
private float maxGroundAngle = 25f;
[SerializeField, Range(0f, 100f)]
float maxSnapSpeed = 100f;
[SerializeField, Min(0f)]
float probeDistance = 1f;
[SerializeField]
LayerMask probeMask = -1;
private Rigidbody body;
private Vector3 desiredVelocity = new Vector3(0f, 0f, 0f);
@ -28,6 +37,7 @@ public class MovingSphere : MonoBehaviour
private Vector3 velocity;
private Vector3 contactNormal;
private float minGroundDotProduct;
private int stepsSinceLastGrounded, stepsSinceLastJump;
private void OnValidate()
{
@ -49,6 +59,10 @@ public class MovingSphere : MonoBehaviour
desiredVelocity = new Vector3(playerInput.x, 0f, playerInput.y) * maxSpeed;
desiredJump |= Input.GetButtonDown("Jump");
GetComponent<MeshRenderer>().material.SetColor(
"_BaseColor", onGround ? Color.black : Color.white
);
}
private void FixedUpdate()
@ -70,10 +84,13 @@ public class MovingSphere : MonoBehaviour
private void UpdateState()
{
stepsSinceLastGrounded++;
stepsSinceLastJump++;
velocity = body.velocity;
if (onGround)
if (onGround || SnapToGround())
{
jumpPhase = 0;
stepsSinceLastGrounded = 0;
if (groundContactCount > 1)
{
contactNormal.Normalize();
@ -112,6 +129,7 @@ public class MovingSphere : MonoBehaviour
{
if (onGround || jumpPhase < maxAirJumps)
{
stepsSinceLastJump = 0;
jumpPhase++;
float jumpSpeed = Mathf.Sqrt(-2f * Physics.gravity.y * jumpHeight);
float alignedSpeed = Vector3.Dot(velocity, contactNormal);
@ -147,9 +165,39 @@ public class MovingSphere : MonoBehaviour
return vector - contactNormal * Vector3.Dot(vector, contactNormal);
}
void ClearState()
private void ClearState()
{
groundContactCount = 0;
contactNormal = Vector3.zero;
}
private bool SnapToGround()
{
if (stepsSinceLastGrounded > 1 || stepsSinceLastJump <= 2)
{
return false;
}
float speed = velocity.magnitude;
if (speed > maxSnapSpeed)
{
return false;
}
if (!Physics.Raycast(body.position, Vector3.down, out RaycastHit hit, probeDistance, probeMask))
{
return false;
}
if (hit.normal.y < minGroundDotProduct)
{
return false;
}
groundContactCount = 1;
contactNormal = hit.normal;
float dot = Vector3.Dot(velocity, hit.normal);
if (dot > 0f)
{
velocity = (velocity - hit.normal * dot).normalized * speed;
}
return true;
}
}

View File

@ -15,7 +15,7 @@ GameObject:
- component: {fileID: 6426552592410720834}
- component: {fileID: 6426552592410720833}
- component: {fileID: 6426552592410720832}
m_Layer: 0
m_Layer: 8
m_Name: Sphere
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -211,6 +211,8 @@ MonoBehaviour:
jumpHeight: 2
maxAirJumps: 1
maxGroundAngle: 25
maxSnapSpeed: 100
probeDistance: 1
--- !u!54 &6426552592410720832
Rigidbody:
m_ObjectHideFlags: 0

View File

@ -13,7 +13,7 @@ TagManager:
- UI
-
-
-
- Agent
-
-
-