From 4a448d4be924cda59d322b7518be41be39258b67 Mon Sep 17 00:00:00 2001 From: "r.nikolin" Date: Mon, 23 Oct 2023 12:40:36 +0300 Subject: [PATCH] Little bug fix --- .../Scripts/Helpers/HandController.cs | 14 +++++++++++--- Assets/_Monuments/Prefabs/DnD/DnD_Origin.prefab | 8 ++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Assets/BNG Framework/Scripts/Helpers/HandController.cs b/Assets/BNG Framework/Scripts/Helpers/HandController.cs index cb82d0c3..903dc616 100644 --- a/Assets/BNG Framework/Scripts/Helpers/HandController.cs +++ b/Assets/BNG Framework/Scripts/Helpers/HandController.cs @@ -613,10 +613,18 @@ namespace BNG { } public virtual void UpdateCurrentHandPose() { - if(handPoser != null) { + if(handPoser != null && grabber != null && grabber.HeldGrabbable != null) { // Update the pose - handPoser.CurrentPose = grabber.HeldGrabbable.SelectedHandPose; - handPoser.OnPoseChanged(); + try + { + handPoser.CurrentPose = grabber.HeldGrabbable.SelectedHandPose; + handPoser.OnPoseChanged(); + + } + catch (System.Exception ex) + { + Debug.LogError(ex.ToString()); + } } } diff --git a/Assets/_Monuments/Prefabs/DnD/DnD_Origin.prefab b/Assets/_Monuments/Prefabs/DnD/DnD_Origin.prefab index 03ce691d..780243e3 100644 --- a/Assets/_Monuments/Prefabs/DnD/DnD_Origin.prefab +++ b/Assets/_Monuments/Prefabs/DnD/DnD_Origin.prefab @@ -916,7 +916,7 @@ LineRenderer: m_SortingOrder: 0 m_Positions: - {x: 0, y: 0, z: 0} - - {x: 1.0649999, y: -1.3373501, z: 0.0012500001} + - {x: 1.0649999, y: -1.4709595, z: 0.0012500001} m_Parameters: serializedVersion: 3 widthMultiplier: 0.002 @@ -1010,7 +1010,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7848207325365017905} m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} - m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalPosition: {x: 0, y: 0.742, z: 0} m_LocalScale: {x: 3.7718403, y: 3.7718403, z: 3.7718403} m_ConstrainProportionsScale: 0 m_Children: @@ -1030,7 +1030,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: c29fc697480a3eb41b5f427c4b070da6, type: 3} m_Name: m_EditorClassIdentifier: - TipOffset: {x: 0, y: 0, z: 0} + TipOffset: {x: 0, y: 0.35, z: 0} UseWorldYAxis: 1 MaxViewDistance: 5 DrawLineTo: {fileID: 1237127912185238182} @@ -1155,7 +1155,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0.18336} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 180, y: 126.02098} m_Pivot: {x: 0.5, y: 0.5} --- !u!223 &7848207325630098494