From 1dd14304235f535e83e6fe628e7251ce7e31f8f4 Mon Sep 17 00:00:00 2001 From: Hazim Bin Ijaz Date: Fri, 10 Jan 2025 18:09:23 +0500 Subject: [PATCH] Fixed wall bugs --- .../Abilities/VectorFencePrefab.prefab | 32 +++++++++++++++++++ Assets/Scripts/Gameplay/AbilitySystem.cs | 4 +-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Assets/Prefabs/Abilities/VectorFencePrefab.prefab b/Assets/Prefabs/Abilities/VectorFencePrefab.prefab index 536d656..5ad556b 100644 --- a/Assets/Prefabs/Abilities/VectorFencePrefab.prefab +++ b/Assets/Prefabs/Abilities/VectorFencePrefab.prefab @@ -15,6 +15,7 @@ GameObject: - component: {fileID: 8921202503349013827} - component: {fileID: 5807442085122568602} - component: {fileID: -7009867759405921325} + - component: {fileID: 8127827489355646816} m_Layer: 0 m_Name: VectorFencePrefab m_TagString: Untagged @@ -158,3 +159,34 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: Ability: {fileID: 11400000, guid: 834f18926d3364d40ab9894f716b4e3b, type: 2} +--- !u!114 &8127827489355646816 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9694722736535169} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e96cb6065543e43c4a752faaa1468eb1, type: 3} + m_Name: + m_EditorClassIdentifier: + UseUnreliableDeltas: 0 + SyncPositionX: 0 + SyncPositionY: 0 + SyncPositionZ: 0 + SyncRotAngleX: 0 + SyncRotAngleY: 0 + SyncRotAngleZ: 0 + SyncScaleX: 0 + SyncScaleY: 1 + SyncScaleZ: 0 + PositionThreshold: 0.001 + RotAngleThreshold: 0.01 + ScaleThreshold: 0.01 + UseQuaternionSynchronization: 0 + UseQuaternionCompression: 0 + UseHalfFloatPrecision: 0 + InLocalSpace: 0 + Interpolate: 1 + SlerpPosition: 0 diff --git a/Assets/Scripts/Gameplay/AbilitySystem.cs b/Assets/Scripts/Gameplay/AbilitySystem.cs index 7fce81f..d8cd3e4 100644 --- a/Assets/Scripts/Gameplay/AbilitySystem.cs +++ b/Assets/Scripts/Gameplay/AbilitySystem.cs @@ -157,8 +157,8 @@ public class AbilitySystem : NetworkBehaviour Quaternion targetRotation = Quaternion.Euler(0f, angle, 0f); // Smooth rotation with Lerp - wallIndicator.transform.rotation = targetRotation; - // wallIndicator.transform.rotation = Quaternion.Lerp(wallIndicator.transform.rotation, targetRotation, Time.deltaTime * wallRotationSpeed); + // wallIndicator.transform.rotation = targetRotation; + wallIndicator.transform.rotation = Quaternion.Lerp(wallIndicator.transform.rotation, targetRotation, Time.deltaTime * wallRotationSpeed); isValidPlacement = IsPlacementValid(wallIndicator.transform.position, wallIndicator.transform.rotation, playerLayer); // Change indicator color based on placement validity