Browse Source

Stuff

main
parent
commit
32fef1fad6
8 changed files with 604 additions and 254 deletions
  1. +1
    -1
      Assets/DecideWhereToGo.cs
  2. +157
    -0
      Assets/Obstacle.prefab
  3. +7
    -0
      Assets/Obstacle.prefab.meta
  4. +402
    -242
      Assets/Scenes/Main.unity
  5. BIN
      Assets/Scenes/Main/NavMesh.asset
  6. +20
    -0
      Assets/Wanderer.cs
  7. +2
    -2
      ProjectSettings/NavMeshAreas.asset
  8. +15
    -9
      ProjectSettings/QualitySettings.asset

+ 1
- 1
Assets/DecideWhereToGo.cs View File

@@ -32,7 +32,7 @@ public class DecideWhereToGo : MonoBehaviour
Vector2 randomPoint = Random.insideUnitCircle * radius;
Vector3 pos = transform.position + new Vector3(randomPoint.x, 0, randomPoint.y);
NavMeshHit hit;
if (NavMesh.SamplePosition(pos, out hit, 0.25f, 1)){
if (NavMesh.SamplePosition(pos, out hit, 0.5f, 1)){
result = hit.position;
return true;
}


+ 157
- 0
Assets/Obstacle.prefab View File

@@ -0,0 +1,157 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6025659182955170897
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6025659182955170902}
- component: {fileID: 6025659182955170901}
- component: {fileID: 6025659182955170900}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 1
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &6025659182955170902
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6025659182955170897}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 6025659183399956186}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &6025659182955170901
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6025659182955170897}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &6025659182955170900
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6025659182955170897}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
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
--- !u!1 &6025659183399956197
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6025659183399956186}
m_Layer: 0
m_Name: Obstacle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &6025659183399956186
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6025659183399956197}
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: 6025659183522709551}
- {fileID: 6025659182955170902}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &6025659183522709550
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6025659183522709551}
- component: {fileID: 6025659183522709548}
m_Layer: 0
m_Name: Collider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &6025659183522709551
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6025659183522709550}
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: []
m_Father: {fileID: 6025659183399956186}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!65 &6025659183522709548
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6025659183522709550}
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.5, z: 0}

+ 7
- 0
Assets/Obstacle.prefab.meta View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2189b38a148350b4dbcce548d05879b1
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 402
- 242
Assets/Scenes/Main.unity View File

@@ -106,21 +106,182 @@ NavMeshSettings:
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentRadius: 0.6
agentHeight: 2
agentSlope: 45
agentSlope: 25
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
cellSize: 0.2
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 23800000, guid: d338b755a57f28344bcde1f52ad1ff09, type: 2}
--- !u!1001 &269044075
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2067227152}
m_Modifications:
- target: {fileID: 6025659182955170897, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_NavMeshLayer
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalScale.x
value: 4
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalScale.z
value: 4.5
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalScale.y
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.15
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.z
value: -2.75
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956197, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Name
value: Platform
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Size.x
value: 4
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Size.z
value: 4.5
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Size.y
value: 0.3
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Center.y
value: 0.15
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2189b38a148350b4dbcce548d05879b1, type: 3}
--- !u!4 &269044076 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
m_PrefabInstance: {fileID: 269044075}
m_PrefabAsset: {fileID: 0}
--- !u!1 &546327653
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 546327654}
m_Layer: 0
m_Name: Visuals
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &546327654
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 546327653}
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: 2044715937}
m_Father: {fileID: 923169544}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &705507993
GameObject:
m_ObjectHideFlags: 0
@@ -160,9 +321,9 @@ Light:
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Bias: 0.238
m_NormalBias: 0.13
m_NearPlane: 0.1
m_CullingMatrixOverride:
e00: 1
e01: 0
@@ -206,13 +367,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 705507993}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalRotation: {x: -0.15220998, y: -0.84548616, z: 0.39425662, w: -0.3264154}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
m_LocalEulerAnglesHint: {x: 50, y: -222.22, z: 0}
--- !u!1 &923169541
GameObject:
m_ObjectHideFlags: 0
@@ -245,6 +406,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
speed: 3
visuals: {fileID: 546327654}
--- !u!195 &923169543
NavMeshAgent:
m_ObjectHideFlags: 0
@@ -254,7 +416,7 @@ NavMeshAgent:
m_GameObject: {fileID: 923169541}
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 0.5
m_Radius: 0.6
m_Speed: 3.5
m_Acceleration: 8
avoidancePriority: 50
@@ -275,10 +437,10 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 923169541}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2.901, y: 0, z: 3.026}
m_LocalPosition: {x: 0.25, y: 0.3, z: -2.75}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2044715937}
- {fileID: 546327654}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -294,7 +456,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 8d08a42636af84c4c8d955f08df4a635, type: 3}
m_Name:
m_EditorClassIdentifier:
radius: 5
radius: 20
--- !u!1 &963194225
GameObject:
m_ObjectHideFlags: 0
@@ -378,164 +540,162 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 50.36, y: 0, z: 0}
--- !u!1 &1964150140
GameObject:
--- !u!1001 &994112635
PrefabInstance:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1964150141}
- component: {fileID: 1964150144}
- component: {fileID: 1964150143}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 1
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &1964150141
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2067227152}
m_Modifications:
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalScale.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalScale.z
value: 4.5
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalScale.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.x
value: -2
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.z
value: -2.75
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956197, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Name
value: Wall
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Size.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Size.z
value: 4.5
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Size.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Center.y
value: 0.5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2189b38a148350b4dbcce548d05879b1, type: 3}
--- !u!4 &1221604627 stripped
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1964150140}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2, y: 0.5, z: -2}
m_LocalScale: {x: 1, y: 1, z: 3.93}
m_Children: []
m_Father: {fileID: 2067227152}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1964150143
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
m_PrefabInstance: {fileID: 994112635}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1964150140}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
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
--- !u!33 &1964150144
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
--- !u!4 &1784489120 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
m_PrefabInstance: {fileID: 6025659184912190074}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1964150140}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &2011153963
--- !u!1 &1793979409 stripped
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 6025659183522709550, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
m_PrefabInstance: {fileID: 269044075}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2011153964}
- component: {fileID: 2011153967}
- component: {fileID: 2011153966}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 1
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &2011153964
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011153963}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0.5, z: 0}
m_LocalScale: {x: 5.64, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2067227152}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &2011153966
MeshRenderer:
--- !u!114 &1793979412
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011153963}
m_GameObject: {fileID: 1793979409}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
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
--- !u!33 &2011153967
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2011153963}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc3616cadc763df4bb0c434fdc9c9c9f, type: 3}
m_Name:
m_EditorClassIdentifier:
onClick:
m_PersistentCalls:
m_Calls: []
onClickPosition:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 923169542}
m_MethodName: SetDestination
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &2044715936
GameObject:
m_ObjectHideFlags: 0
@@ -561,11 +721,11 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2044715936}
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: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 923169544}
m_Father: {fileID: 546327654}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &2044715938
@@ -707,9 +867,9 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2011153964}
- {fileID: 1964150141}
- {fileID: 2126686970}
- {fileID: 1784489120}
- {fileID: 269044076}
- {fileID: 1221604627}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -742,82 +902,82 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &2126686969
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2126686970}
- component: {fileID: 2126686973}
- component: {fileID: 2126686972}
m_Layer: 0
m_Name: Cube (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 1
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &2126686970
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2126686969}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.99, y: 0.5, z: -2.75}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 2067227152}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &2126686972
MeshRenderer:
--- !u!1001 &6025659184912190074
PrefabInstance:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2126686969}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
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
--- !u!33 &2126686973
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2126686969}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 2067227152}
m_Modifications:
- target: {fileID: 6025659182955170902, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalScale.x
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956186, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6025659183399956197, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Name
value: Wall
objectReference: {fileID: 0}
- target: {fileID: 6025659183522709548, guid: 2189b38a148350b4dbcce548d05879b1,
type: 3}
propertyPath: m_Size.x
value: 5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2189b38a148350b4dbcce548d05879b1, type: 3}

BIN
Assets/Scenes/Main/NavMesh.asset View File


+ 20
- 0
Assets/Wanderer.cs View File

@@ -8,6 +8,7 @@ public class Wanderer : MonoBehaviour

NavMeshAgent agent;
public float speed;
public Transform visuals;

public bool isNavigating {
get {
@@ -36,6 +37,25 @@ public class Wanderer : MonoBehaviour
} else {

}
RaycastHit floorHit;
Ray ray = new Ray(
transform.position + Vector3.up,
Vector3.down*2
);
Debug.DrawRay(ray.origin, ray.direction, Color.blue);
if (Physics.Raycast(
transform.position + Vector3.up,
Vector3.down,
out floorHit,
2
)){
Debug.DrawRay(floorHit.point, Vector3.up, Color.green);
visuals.position = new Vector3(
transform.position.x,
floorHit.point.y,
transform.position.z
);
}
}

Vector3 GetPathPosition(){


+ 2
- 2
ProjectSettings/NavMeshAreas.asset View File

@@ -69,11 +69,11 @@ NavMeshProjectSettings:
cost: 1
- name:
cost: 1
m_LastAgentTypeID: -887442657
m_LastAgentTypeID: -1372625422
m_Settings:
- serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentRadius: 0.6
agentHeight: 2
agentSlope: 45
agentClimb: 0.75


+ 15
- 9
ProjectSettings/QualitySettings.asset View File

@@ -18,7 +18,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 1
skinWeights: 1
textureQuality: 1
anisotropicTextures: 0
antiAliasing: 0
@@ -40,6 +40,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Low
@@ -53,7 +54,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 0
antiAliasing: 0
@@ -75,6 +76,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Medium
@@ -88,7 +90,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 0
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 0
@@ -110,6 +112,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: High
@@ -123,7 +126,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 2
skinWeights: 2
textureQuality: 0
anisotropicTextures: 1
antiAliasing: 0
@@ -145,6 +148,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Very High
@@ -158,7 +162,7 @@ QualitySettings:
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
skinWeights: 4
textureQuality: 0
anisotropicTextures: 2
antiAliasing: 2
@@ -180,20 +184,21 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
- serializedVersion: 2
name: Ultra
pixelLightCount: 4
shadows: 2
shadowResolution: 2
shadowProjection: 1
shadowResolution: 3
shadowProjection: 0
shadowCascades: 4
shadowDistance: 150
shadowDistance: 50
shadowNearPlaneOffset: 3
shadowCascade2Split: 0.33333334
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
shadowmaskMode: 1
blendWeights: 4
skinWeights: 4
textureQuality: 0
anisotropicTextures: 2
antiAliasing: 2
@@ -215,6 +220,7 @@ QualitySettings:
asyncUploadBufferSize: 16
asyncUploadPersistentBuffer: 1
resolutionScalingFixedDPIFactor: 1
customRenderPipeline: {fileID: 0}
excludedTargetPlatforms: []
m_PerPlatformDefaultQuality:
Android: 2


Loading…
Cancel
Save