diff --git a/Assets/Scenes/TowerTest.unity b/Assets/Scenes/TowerTest.unity index 2424707..a9d466b 100644 --- a/Assets/Scenes/TowerTest.unity +++ b/Assets/Scenes/TowerTest.unity @@ -934,7 +934,7 @@ PrefabInstance: - target: {fileID: 2981308973353539976, guid: fd9f9b61c0ebb324ebc9f929e26706bc, type: 3} propertyPath: m_LocalPosition.y - value: 4.29 + value: 2.95 objectReference: {fileID: 0} - target: {fileID: 2981308973353539976, guid: fd9f9b61c0ebb324ebc9f929e26706bc, type: 3} @@ -969,7 +969,7 @@ PrefabInstance: - target: {fileID: 3665490202611795451, guid: fd9f9b61c0ebb324ebc9f929e26706bc, type: 3} propertyPath: m_LocalPosition.y - value: 4.29 + value: 2.95 objectReference: {fileID: 0} - target: {fileID: 3665490202611795451, guid: fd9f9b61c0ebb324ebc9f929e26706bc, type: 3} @@ -1004,7 +1004,7 @@ PrefabInstance: - target: {fileID: 6115888582170302332, guid: fd9f9b61c0ebb324ebc9f929e26706bc, type: 3} propertyPath: m_LocalPosition.y - value: 0.84 + value: -0.5 objectReference: {fileID: 0} - target: {fileID: 6115888582170302332, guid: fd9f9b61c0ebb324ebc9f929e26706bc, type: 3} diff --git a/Assets/Scripts/Utilities/EditableArc.cs b/Assets/Scripts/Utilities/EditableArc.cs index 5a0193d..83077f9 100644 --- a/Assets/Scripts/Utilities/EditableArc.cs +++ b/Assets/Scripts/Utilities/EditableArc.cs @@ -70,14 +70,15 @@ public class EditableArc : MonoBehaviour Vector3 start = Quaternion.AngleAxis(rotationMinMax.x, normal) * tangent; Vector3 end = Quaternion.AngleAxis(rotationMinMax.y, normal) * tangent; Vector3 v1 = SamplePointOnArcAngle(start, end, visualRadius, Value.Value); - Vector3 v2 = SamplePointOnArcAngle(start, end, visualRadius, Value.Value + 0.01f); - Vector3 arcTangent = v2 - v1; + Vector3 v2 = SamplePointOnArcAngle(start, end, visualRadius, Value.Value + 1f); + Vector3 arcTangent = (v2 - v1).normalized; Debug.DrawRay(knob.transform.position, arcTangent, Color.yellow, 5f); + Debug.Log($"tangent: {arcTangent}"); // TODO: figure out this based on camera orientation float sign = -1f; - float delta = (Vector2.Dot(arcTangent, Vector2.up * mouseMovement.x) + Vector2.Dot(arcTangent, Vector2.right * mouseMovement.y)) * knobSensitiviy; + float delta = (Vector2.Dot(arcTangent, Vector2.up * mouseMovement.x) + Vector2.Dot(arcTangent, Vector2.right * mouseMovement.y)) * knobSensitiviy * sign; Debug.Log(delta); float newAngle = ClampAngle(Value.Value + delta, rotationMinMax.x, rotationMinMax.y); Value.Value = newAngle; diff --git a/ProjectSettings/TagManager.asset b/ProjectSettings/TagManager.asset index 65d15ac..13bf0b7 100644 --- a/ProjectSettings/TagManager.asset +++ b/ProjectSettings/TagManager.asset @@ -3,7 +3,8 @@ --- !u!78 &1 TagManager: serializedVersion: 2 - tags: [] + tags: + - Wall layers: - Default - TransparentFX