From cf41fe245e0df14c2df910e3c2bb824564501c2d Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Sat, 25 Mar 2023 19:41:40 +0800 Subject: [PATCH] AI added for Level 1 --- Assets/Navigation Data/Level1_NavData.shnav | Bin 0 -> 836 bytes .../Level1_NavData.shnav.shmeta | 3 + Assets/Scenes/Level1.shade | 184 ++++++++++++------ 3 files changed, 129 insertions(+), 58 deletions(-) create mode 100644 Assets/Navigation Data/Level1_NavData.shnav create mode 100644 Assets/Navigation Data/Level1_NavData.shnav.shmeta diff --git a/Assets/Navigation Data/Level1_NavData.shnav b/Assets/Navigation Data/Level1_NavData.shnav new file mode 100644 index 0000000000000000000000000000000000000000..d1bbf622d6f77f7f7b1e7c9ec12159c73fc4e465 GIT binary patch literal 836 zcmWGw2w(sL2M}@gjLrcDh7Uk?gFOSo0S5(UkSGJgf06+|P&-5u9v0*O|4>=uw6gjn)mmw?paXUW0U(UJA%|9_}$G-v$-Cliou iWU}hvdMRT4vu}VT*m@+^eu&Wj`hRd1LjydD;Vb~0SXbx( literal 0 HcmV?d00001 diff --git a/Assets/Navigation Data/Level1_NavData.shnav.shmeta b/Assets/Navigation Data/Level1_NavData.shnav.shmeta new file mode 100644 index 00000000..a3c110f5 --- /dev/null +++ b/Assets/Navigation Data/Level1_NavData.shnav.shmeta @@ -0,0 +1,3 @@ +Name: Level1_NavData +ID: 257298636 +Type: 15 diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index bd859381..f7f2a167 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -1,4 +1,4 @@ -- NavData: 0 +- NavData: 257298636 - EID: 1 Name: DefaultLight IsActive: true @@ -2464,7 +2464,7 @@ - Is Trigger: false Collision Tag: 0 Type: Box - Half Extents: {x: 1, y: 2.20000005, z: 0.25} + Half Extents: {x: 1, y: 7.30000019, z: 0.25} Friction: 0.400000006 Bounciness: 0 Density: 1 @@ -4108,7 +4108,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 7 + Collision Tag: 8 Type: Box Half Extents: {x: 20, y: 0.100000001, z: 20} Friction: 0.400000006 @@ -7612,60 +7612,6 @@ retryBtn: 455 quitBtn: 456 canvas: 458 -- EID: 235 - Name: ====AI===== - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 2.13981342, y: 0.0490087792, z: -1.86932743} - Rotate: {x: -0, y: -1.53675354, z: 0} - Scale: {x: 1, y: 1, z: 1} - IsActive: true - Renderable Component: - Mesh: 148542784 - Material: 121518381 - IsActive: true - RigidBody Component: - Type: Dynamic - Drag: 0.00999999978 - Angular Drag: 0.100000001 - Gravity Scale: 1 - Use Gravity: true - Interpolate: true - Sleeping Enabled: true - Freeze Position X: false - Freeze Position Y: false - Freeze Position Z: false - Freeze Rotation X: true - Freeze Rotation Y: false - Freeze Rotation Z: true - IsActive: true - Collider Component: - Colliders: - - Is Trigger: false - Collision Tag: 5 - Type: Box - Half Extents: {x: 0.600000024, y: 1.79999995, z: 0.400000006} - Friction: 0.400000006 - Bounciness: 0 - Density: 1 - Position Offset: {x: 0, y: 0.899999976, z: 0} - Rotation Offset: {x: 0, y: 0, z: 0} - IsActive: true - Scripts: - - Type: Homeowner1 - Enabled: true - waypointsPool: 234 - startWaypoint: 233 - patrolSpeed: 3 - chaseSpeed: 6 - turningSpeed: 5 - sightDistance: 8 - eyeOffset: [0, 1.64999998, 0] - distanceToCapture: 0.5 - captureTime: 0.5 - footstepSFXIntervalMultiplier: 0.5 - EID: 234 Name: ====WaypointPool==== IsActive: true @@ -9296,4 +9242,126 @@ Color Tint: {x: 0.0187467411, y: 0.627120614, z: 0.709251106, w: 1} Acceleration: {x: 0, y: -0.100000001, z: 0} IsActive: true - Scripts: ~ \ No newline at end of file + Scripts: ~ +- EID: 65771 + Name: ====AI===== + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 2.0999999, y: 0.225323141, z: -1.79999995} + Rotate: {x: -0, y: 0, z: -0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Renderable Component: + Mesh: 148542784 + Material: 121518381 + IsActive: true + RigidBody Component: + Type: Dynamic + Drag: 0.00999999978 + Angular Drag: 0.100000001 + Gravity Scale: 1 + Use Gravity: true + Interpolate: false + Sleeping Enabled: true + Freeze Position X: false + Freeze Position Y: false + Freeze Position Z: false + Freeze Rotation X: true + Freeze Rotation Y: false + Freeze Rotation Z: true + IsActive: true + Collider Component: + Colliders: + - Is Trigger: false + Collision Tag: 5 + Type: Box + Half Extents: {x: 0.200000003, y: 1.79999995, z: 0.200000003} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 0.899999976, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Navigation Component: + Target: {x: 0, y: 0, z: 0} + Forward: {x: 0, y: 0, z: 0} + Recalculate Path: true + Unreachable Target: false + Tolerance: 1 + Acceptance threshold: 0.100000001 + IsActive: true + Animator Component: + Rig: 76586906 + AnimationController: 0 + IsActive: true + Scripts: + - Type: SHADE_Scripting.Gameplay.AIBehaviour.AIRework.AILineOfSight + Enabled: true + player: 65775 + range: 5 + angle: 30 + angleBetween: 0 + distance: 0 + heightLimit: 1 + rayOffset: [0, 0, 0] + withinRange: false + withinSight: false + lastFoundPos: [0, 0, 0] + lastFoundTimer: 0 + - Type: SHADE_Scripting.Gameplay.AIBehaviour.AIRework.RotateToVelocity + Enabled: true + rotationPerSecond: 5 + active: true + rotateToPlayerLastKnown: false + lookAround: false + - Type: SHADE_Scripting.Gameplay.AIBehaviour.AIRework.HomeOwnerAI + Enabled: true + idleDuration: 1 + timeoutDuration: 2 + patrolPointParent: 234 + patrolSpeed: 1 + chaseSpeed: 3 + alertCooldown: 0 + player: 65775 + attackHitbox: 627 + walkingAnim: 229189609 + idleAnim: 224442713 + alertAnim: 227890696 + alertRunAnim: 230172366 + alertIdleAnim: 234046577 + timeoutAnim: 228323560 + atkWindupAnim: 223078653 + atkHoldAnim: 228250554 + atkSeqAnim: 226129627 + - Type: StateMachine + Enabled: true + currentStateName: "" + currentAnimName: "" +- EID: 627 + Name: AttackHitbox + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: -0.10252738, z: -2.20271254} + Rotate: {x: 0, y: 0, z: 0} + Scale: {x: 1, y: 1, z: 1} + IsActive: true + Collider Component: + Colliders: + - Is Trigger: true + Collision Tag: 5 + Type: Box + Half Extents: {x: 0.600000024, y: 1.79999995, z: 1.5} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: 0, y: 1, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} + IsActive: true + Scripts: + - Type: SHADE_Scripting.Gameplay.AIBehaviour.AIRework.HomeOwnerAttackHitbox + Enabled: true + aiGO: 65771 \ No newline at end of file