From 0c147dd1fb694806752a8d7bedd24f0c3fa8dbf7 Mon Sep 17 00:00:00 2001 From: yutopp Date: Wed, 13 Mar 2019 19:58:08 +0900 Subject: [PATCH] Move value updation into the if block --- Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs b/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs index de6699cba..0d5021a73 100644 --- a/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs +++ b/Assets/VRM/UniVRM/Editor/FirstPerson/VRMFirstPersonEditor.cs @@ -27,8 +27,9 @@ namespace VRM if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(component, "Changed FirstPerson"); + + component.FirstPersonOffset = head.worldToLocalMatrix.MultiplyPoint(worldOffset); } - component.FirstPersonOffset = head.worldToLocalMatrix.MultiplyPoint(worldOffset); } } }