From 4a149508c9d5c33354374c6b5fb1a863d3f2fd3c Mon Sep 17 00:00:00 2001 From: maverickdgg Date: Sat, 25 Mar 2023 17:20:42 +0800 Subject: [PATCH] Level 3 generated --- Assets/Navigation Data/Level3_NavData.shnav | Bin 0 -> 836 bytes .../Level3_NavData.shnav.shmeta | 3 + Assets/Scenes/Level3.shade | 167 ++++++++++++------ .../src/Navigation/SHNavigationSystem.cpp | 4 +- 4 files changed, 114 insertions(+), 60 deletions(-) create mode 100644 Assets/Navigation Data/Level3_NavData.shnav create mode 100644 Assets/Navigation Data/Level3_NavData.shnav.shmeta diff --git a/Assets/Navigation Data/Level3_NavData.shnav b/Assets/Navigation Data/Level3_NavData.shnav new file mode 100644 index 0000000000000000000000000000000000000000..42d64e5bb465859f1b26ec459ce759c9eb4e5286 GIT binary patch literal 836 zcmcJM%?-jZ422)+A;*pYgH)ouaqLEA6h`SNWrGY*$=J^!LTQQwh#ag>&-LHyh!H^F zYtVP=H4MP@3|xj&V;UfVQQp1|bIMm}%34Vr0IRJK=c+#Y2CyzcKMjARRj=?FyTnbI z&E(6QR-?9yb3=D3)Otk}Nu>AwNQ=nPyA-t84Aa!aDn+@cY(Zib)LuwiCG87Zb8SHf fGlbff+$+l_;ziCMxTeR*M2DWlze8=GJhP1tA2FnT literal 0 HcmV?d00001 diff --git a/Assets/Navigation Data/Level3_NavData.shnav.shmeta b/Assets/Navigation Data/Level3_NavData.shnav.shmeta new file mode 100644 index 00000000..211b87b7 --- /dev/null +++ b/Assets/Navigation Data/Level3_NavData.shnav.shmeta @@ -0,0 +1,3 @@ +Name: Level3_NavData +ID: 263362242 +Type: 15 diff --git a/Assets/Scenes/Level3.shade b/Assets/Scenes/Level3.shade index 4e17191c..cb26623c 100644 --- a/Assets/Scenes/Level3.shade +++ b/Assets/Scenes/Level3.shade @@ -1,4 +1,4 @@ -- NavData: 0 +- NavData: 263362242 - EID: 0 Name: Light_Direction IsActive: true @@ -4573,6 +4573,15 @@ Density: 1 Position Offset: {x: 0.284000009, y: 0.305999994, z: 0.555999994} Rotation Offset: {x: 0, y: 0, z: 0} + - Is Trigger: false + Collision Tag: 9 + Type: Box + Half Extents: {x: 1.70000005, y: 1, z: 1.79999995} + Friction: 0.400000006 + Bounciness: 0 + Density: 1 + Position Offset: {x: -0.200000003, y: 0.200000003, z: 0} + Rotation Offset: {x: 0, y: 0, z: 0} IsActive: true Scripts: ~ - EID: 206 @@ -5696,7 +5705,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 7 + Collision Tag: 8 Type: Box Half Extents: {x: 15, y: 1, z: 15} Friction: 0.400000006 @@ -8930,60 +8939,6 @@ Clicked: false IsActive: true Scripts: ~ -- EID: 542 - Name: ====AI===== - IsActive: true - NumberOfChildren: 0 - Components: - Transform Component: - Translate: {x: 1.19757175, y: 0, z: 0.855755448} - 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.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: 541 - startWaypoint: 540 - patrolSpeed: 0.75 - chaseSpeed: 2 - turningSpeed: 5 - sightDistance: 8 - eyeOffset: [0, 1.64999998, 0] - distanceToCapture: 0.800000012 - captureTime: 0.5 - footstepSFXIntervalMultiplier: 0.5 - EID: 541 Name: ====WaypointPool==== IsActive: true @@ -12335,7 +12290,7 @@ NumberOfChildren: 8 Components: Transform Component: - Translate: {x: 5.5, y: 0.171148509, z: 10} + Translate: {x: 5.5, y: 0.300000012, z: 10} Rotate: {x: -0, y: -3.1415925, z: 0} Scale: {x: 0.999999404, y: 1, z: 0.999999404} IsActive: true @@ -15497,4 +15452,100 @@ 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: 66078 + Name: ====AI===== + IsActive: true + NumberOfChildren: 0 + Components: + Transform Component: + Translate: {x: 0, y: 0, z: -2.93461704} + 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.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 + 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: 541 + 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: "" \ No newline at end of file diff --git a/SHADE_Engine/src/Navigation/SHNavigationSystem.cpp b/SHADE_Engine/src/Navigation/SHNavigationSystem.cpp index bf0feda0..6d99d97c 100644 --- a/SHADE_Engine/src/Navigation/SHNavigationSystem.cpp +++ b/SHADE_Engine/src/Navigation/SHNavigationSystem.cpp @@ -240,8 +240,8 @@ namespace SHADE if (system->drawNavigationArea) { SHTransform trans; - trans.position = SHVec3{ 0.0f }; - trans.scale = navigationAreaSize; + trans.position = system->origin_editor; + trans.scale = system->size_editor; trans.ComputeTRS(); debugDrawSystem->DrawWireCube(trans.trs, SHColour::YELLOW, false); }