diff --git a/Assets/Scenes/Level1.shade b/Assets/Scenes/Level1.shade index 6e3aa1c5..9fcbf7ce 100644 --- a/Assets/Scenes/Level1.shade +++ b/Assets/Scenes/Level1.shade @@ -2419,7 +2419,7 @@ Components: Transform Component: Translate: {x: 0, y: 0, z: 0} - Rotate: {x: 0, y: 0, z: 0} + Rotate: {x: -1.48352981, y: 0, z: 0} Scale: {x: 1, y: 1, z: 1} IsActive: true Renderable Component: @@ -4107,7 +4107,7 @@ Collider Component: Colliders: - Is Trigger: false - Collision Tag: 0 + Collision Tag: 1 Type: Box Half Extents: {x: 20, y: 0.100000001, z: 20} Friction: 0.400000006 @@ -4299,6 +4299,8 @@ Enabled: true Score: 50 currCategory: 1 + returnBack: false + firstPostion: [0, 0, 0] density: 1 dontReturn: false soundDistance: 10 @@ -4311,7 +4313,7 @@ NumberOfChildren: 0 Components: Transform Component: - Translate: {x: 3.22328258, y: 1.02709854, z: -0.57395637} + Translate: {x: 3.22328258, y: 1.11577427, z: -0.57395637} Rotate: {x: 5.62993963e-09, y: -7.03049191e-17, z: -1.92319405e-08} Scale: {x: 1, y: 1, z: 1} IsActive: true @@ -4351,6 +4353,8 @@ Enabled: true Score: 500 currCategory: 2 + returnBack: false + firstPostion: [0, 0, 0] density: 1 dontReturn: false soundDistance: 10 @@ -4403,6 +4407,8 @@ Enabled: true Score: 10 currCategory: 0 + returnBack: false + firstPostion: [0, 0, 0] density: 1 dontReturn: false soundDistance: 10 @@ -4455,6 +4461,8 @@ Enabled: true Score: 10 currCategory: 0 + returnBack: false + firstPostion: [0, 0, 0] density: 1 dontReturn: false soundDistance: 10 @@ -4804,7 +4812,7 @@ IsActive: true Animator Component: Rig: 72178939 - Clip: 72178939 + AnimationController: 0 IsActive: true Scripts: ~ - EID: 219 @@ -4823,7 +4831,7 @@ IsActive: true Animator Component: Rig: 80728853 - Clip: 80728853 + AnimationController: 0 IsActive: true Scripts: ~ - EID: 218 @@ -4842,7 +4850,7 @@ IsActive: true Animator Component: Rig: 80500944 - Clip: 80500944 + AnimationController: 0 IsActive: true Scripts: ~ - EID: 220 @@ -4861,7 +4869,7 @@ IsActive: true Animator Component: Rig: 76715962 - Clip: 76715962 + AnimationController: 0 IsActive: true Scripts: ~ - EID: 198 diff --git a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs index 2aebc3b7..4640b5eb 100644 --- a/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs +++ b/Assets/Scripts/Gameplay/AIBehaviour/Implemented/LeafNodes/LeafSearch.cs @@ -156,7 +156,7 @@ public partial class LeafSearch : BehaviourTreeNode //Draw a ray, succeed if ray is unobstructed Vector3 eyePosition = transform.GlobalPosition + eyeOffset; - BoxCollider playerCollider = player.GetValueOrDefault().GetComponent().GetCollisionShape(0); + Collider playerCollider = player.GetValueOrDefault().GetComponent(); if (playerCollider == null) { //Debug.Log("Failure: Player has no collider"); @@ -167,7 +167,7 @@ public partial class LeafSearch : BehaviourTreeNode } //Ray destination to target the centre of the player's collider instead of transform position //Since transform position is often the raccoon's base and the ray needs to hit somewhere higher to be more reliable - Vector3 rayDestination = plrT.GlobalPosition + plrT.GlobalScale * playerCollider.PositionOffset; + Vector3 rayDestination = plrT.GlobalPosition + plrT.GlobalScale * playerCollider.GetCollisionShape(0).PositionOffset; Ray sightRay = new Ray(eyePosition, rayDestination - eyePosition); RaycastHit sightRayHit = Physics.Raycast(sightRay, false, (ushort)65535)[0]; //As of November 2022, RaycastHit contains only the FIRST object hit by diff --git a/Assets/Scripts/Gameplay/Item/SC_Item.cs b/Assets/Scripts/Gameplay/Item/SC_Item.cs index b315ab08..be28bb5a 100644 --- a/Assets/Scripts/Gameplay/Item/SC_Item.cs +++ b/Assets/Scripts/Gameplay/Item/SC_Item.cs @@ -86,12 +86,17 @@ public class Item : Script if (returnBack && !dontReturn) { + if (rb) + { + rb.LinearVelocity = Vector3.Zero; + rb.AngularVelocity = Vector3.Zero; + rb.ClearForces(); + rb.ClearTorque(); + } + if(transform) transform.LocalPosition = firstPostion; - if (rb) - rb.LinearVelocity = Vector3.Zero; - returnBack = false; } diff --git a/SHADE_Engine/src/Camera/SHCameraSystem.cpp b/SHADE_Engine/src/Camera/SHCameraSystem.cpp index bd35af76..921f6f80 100644 --- a/SHADE_Engine/src/Camera/SHCameraSystem.cpp +++ b/SHADE_Engine/src/Camera/SHCameraSystem.cpp @@ -280,7 +280,7 @@ namespace SHADE if (arm->lookAtCameraOrigin) - CameraLookAt(camera, camera.position + arm->GetTargetOffset()); + CameraLookAt(camera, camera.position + tOffset); }