diff --git a/Visuo-haptic Toolkit/Assets/Demo Scenes/Corridor/Scenes/RedirectionCorridor.unity b/Visuo-haptic Toolkit/Assets/Demo Scenes/Corridor/Scenes/RedirectionCorridor.unity index f0d268f8..3e3990b6 100644 --- a/Visuo-haptic Toolkit/Assets/Demo Scenes/Corridor/Scenes/RedirectionCorridor.unity +++ b/Visuo-haptic Toolkit/Assets/Demo Scenes/Corridor/Scenes/RedirectionCorridor.unity @@ -1185,8 +1185,12 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7088029602675669135, guid: 7e46c8eb8c13fdb429130703b04c8216, type: 3} propertyPath: _technique - value: 5 + value: 2 objectReference: {fileID: 0} + - target: {fileID: 7088029602675669135, guid: 7e46c8eb8c13fdb429130703b04c8216, type: 3} + propertyPath: scene.parameters + value: + objectReference: {fileID: 11400000, guid: c39097e50bc3898498d2edf378be3a21, type: 2} - target: {fileID: 7088029602675669135, guid: 7e46c8eb8c13fdb429130703b04c8216, type: 3} propertyPath: scene.virtualHead value: diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/Scene.cs b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/Scene.cs index 60cc7202..18e618be 100644 --- a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/Scene.cs +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/Scene.cs @@ -68,6 +68,8 @@ public record Scene() { [Ignore] public float previousRedirection; [Ignore] public Vector3 strategyDirection; + [Ignore] public ParametersToolkit parameters; + /// /// The position of the virtual limb is given by physicalHand.position + Redirection. /// diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/World Redirection/Techniques.cs b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/World Redirection/Techniques.cs index 3f436b4d..8037ac1c 100644 --- a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/World Redirection/Techniques.cs +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Redirection/World Redirection/Techniques.cs @@ -32,8 +32,8 @@ public static float GetRedirection(Scene scene) { float angleToTarget = scene.GetHeadAngleToTarget(); angleToTarget = (angleToTarget > 180f)? angleToTarget - 360f : angleToTarget; - return Mathf.Abs(angleToTarget) > Toolkit.Instance.parameters.RotationalError - ? Mathf.Sign(angleToTarget) * Toolkit.Instance.parameters.OverTimeRotation * Time.deltaTime + return Mathf.Abs(angleToTarget) > scene.parameters.RotationalError + ? Mathf.Sign(angleToTarget) * scene.parameters.OverTimeRotation * Time.deltaTime : 0f; } @@ -42,8 +42,8 @@ public static float GetRedirectionReset(Scene scene) { angleToTarget = (angleToTarget > 180f)? angleToTarget - 360f : angleToTarget; Debug.Log(angleToTarget); - return Mathf.Abs(angleToTarget) > Toolkit.Instance.parameters.RotationalError - ? - Mathf.Sign(angleToTarget) * Toolkit.Instance.parameters.OverTimeRotation * Time.deltaTime + return Mathf.Abs(angleToTarget) > scene.parameters.RotationalError + ? - Mathf.Sign(angleToTarget) * scene.parameters.OverTimeRotation * Time.deltaTime : 0f; } } @@ -62,11 +62,11 @@ public static float GetRedirection(Scene scene) { float angleToTarget = scene.GetHeadAngleToTarget(); float instantRotation = scene.GetHeadInstantRotationY(); - if (Mathf.Abs(angleToTarget) > Toolkit.Instance.parameters.RotationalError && Mathf.Abs(instantRotation) > Toolkit.Instance.parameters.RotationThreshold) { - Debug.Log($"{instantRotation} - {instantRotation * ((Mathf.Sign(scene.GetHeadAngleToTarget()) != Mathf.Sign(instantRotation))? Toolkit.Instance.parameters.GainsRotational.opposite - 1 : Toolkit.Instance.parameters.GainsRotational.same - 1)}"); + if (Mathf.Abs(angleToTarget) > scene.parameters.RotationalError && Mathf.Abs(instantRotation) > scene.parameters.RotationThreshold) { + Debug.Log($"{instantRotation} - {instantRotation * ((Mathf.Sign(scene.GetHeadAngleToTarget()) != Mathf.Sign(instantRotation))? scene.parameters.GainsRotational.opposite - 1 : scene.parameters.GainsRotational.same - 1)}"); return instantRotation * ((Mathf.Sign(scene.GetHeadAngleToTarget()) != Mathf.Sign(instantRotation)) - ? Toolkit.Instance.parameters.GainsRotational.opposite - 1 - : Toolkit.Instance.parameters.GainsRotational.same - 1); + ? scene.parameters.GainsRotational.opposite - 1 + : scene.parameters.GainsRotational.same - 1); } return 0f; } @@ -75,10 +75,10 @@ public static float GetRedirectionReset(Scene scene) { float angleToTarget = scene.HeadToHeadRedirection.eulerAngles.y; float instantRotation = scene.GetHeadInstantRotationY(); - if (Mathf.Abs(instantRotation) > Toolkit.Instance.parameters.RotationThreshold && Mathf.Abs(angleToTarget) > Toolkit.Instance.parameters.RotationalError) { + if (Mathf.Abs(instantRotation) > scene.parameters.RotationThreshold && Mathf.Abs(angleToTarget) > scene.parameters.RotationalError) { return instantRotation * ((Mathf.Sign(scene.GetHeadAngleToTarget()) != Mathf.Sign(instantRotation)) - ? Toolkit.Instance.parameters.GainsRotational.opposite - 1 - : Toolkit.Instance.parameters.GainsRotational.same - 1); + ? scene.parameters.GainsRotational.opposite - 1 + : scene.parameters.GainsRotational.same - 1); } return 0f; } @@ -97,12 +97,12 @@ public override void Redirect(Scene scene) { public static float GetRedirection(Scene scene) { float instantTranslation = scene.GetHeadInstantTranslationForward().magnitude; - return instantTranslation > Toolkit.Instance.parameters.WalkingThreshold * Time.deltaTime - ? Mathf.Sign(Vector3.Cross(scene.physicalHead.forward, scene.forwardTarget).y) * instantTranslation * CurvatureRadiusToRotationRate() + return instantTranslation > scene.parameters.WalkingThreshold * Time.deltaTime + ? Mathf.Sign(Vector3.Cross(scene.physicalHead.forward, scene.forwardTarget).y) * instantTranslation * CurvatureRadiusToRotationRate(scene) : 0f; } - public static float CurvatureRadiusToRotationRate() => 180f / (Mathf.PI * Toolkit.Instance.parameters.CurvatureRadius); + public static float CurvatureRadiusToRotationRate(Scene scene) => 180f / (Mathf.PI * scene.parameters.CurvatureRadius); } @@ -169,12 +169,12 @@ public float GetRedirection(Scene scene) { } private float ApplyDampening(Scene scene, float angle) { - float dampenedAngle = angle * Mathf.Sin(Mathf.Min(scene.GetHeadAngleToTarget() / Toolkit.Instance.parameters.DampeningRange, 1f) * Mathf.PI/2); - float dampenedAngleDistance = dampenedAngle * Mathf.Min(scene.GetHeadToTargetDistance() / Toolkit.Instance.parameters.DampeningDistanceThreshold, 1f); - return (scene.GetHeadToTargetDistance() < Toolkit.Instance.parameters.DampeningDistanceThreshold)? dampenedAngleDistance : dampenedAngle; + float dampenedAngle = angle * Mathf.Sin(Mathf.Min(scene.GetHeadAngleToTarget() / scene.parameters.DampeningRange, 1f) * Mathf.PI/2); + float dampenedAngleDistance = dampenedAngle * Mathf.Min(scene.GetHeadToTargetDistance() / scene.parameters.DampeningDistanceThreshold, 1f); + return (scene.GetHeadToTargetDistance() < scene.parameters.DampeningDistanceThreshold)? dampenedAngleDistance : dampenedAngle; } - public float ApplySmoothing(Scene scene, float angle) => (1 - Toolkit.Instance.parameters.SmoothingFactor) * scene.previousRedirection + Toolkit.Instance.parameters.SmoothingFactor * angle; + public float ApplySmoothing(Scene scene, float angle) => (1 - scene.parameters.SmoothingFactor) * scene.previousRedirection + scene.parameters.SmoothingFactor * angle; } /// @@ -183,7 +183,7 @@ private float ApplyDampening(Scene scene, float angle) { /// public class Steinicke2008Translational: WorldRedirectionTechnique { public override void Redirect(Scene scene) { - scene.virtualHead.Translate(Vector3.Scale(scene.GetHeadInstantTranslation(), Toolkit.Instance.parameters.GainsTranslational - Vector3.one), relativeTo: Space.World); + scene.virtualHead.Translate(Vector3.Scale(scene.GetHeadInstantTranslation(), scene.parameters.GainsTranslational - Vector3.one), relativeTo: Space.World); CopyHeadAndLimbTransform(scene); } } @@ -203,12 +203,12 @@ public static float GetRedirection(Scene scene) { float angleBetweenTargets = Vector3.SignedAngle(Vector3.ProjectOnPlane(scene.physicalTarget.position - scene.origin.position, Vector3.up), scene.virtualTarget.position - scene.origin.position, Vector3.up); float angleBetweenHeads = Vector3.SignedAngle(Vector3.ProjectOnPlane(scene.physicalHead.forward, Vector3.up), scene.virtualHead.forward, Vector3.up); - if (Mathf.Abs(angleBetweenTargets - angleBetweenHeads) > Toolkit.Instance.parameters.RotationalError) { + if (Mathf.Abs(angleBetweenTargets - angleBetweenHeads) > scene.parameters.RotationalError) { float angle = angleBetweenTargets - angleBetweenHeads; float instantRotation = scene.GetHeadInstantRotationY(); - if (Mathf.Abs(instantRotation) > Toolkit.Instance.parameters.RotationThreshold && Mathf.Abs(angle) > Toolkit.Instance.parameters.RotationalError) { - var gain = (Mathf.Sign(angle) != Mathf.Sign(instantRotation)) ? Toolkit.Instance.parameters.GainsRotational.same : Toolkit.Instance.parameters.GainsRotational.opposite; + if (Mathf.Abs(instantRotation) > scene.parameters.RotationThreshold && Mathf.Abs(angle) > scene.parameters.RotationalError) { + var gain = (Mathf.Sign(angle) != Mathf.Sign(instantRotation)) ? scene.parameters.GainsRotational.same : scene.parameters.GainsRotational.opposite; var bound = Mathf.Abs(gain * instantRotation); return Mathf.Clamp(angle, -bound, bound); } diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Editor/Redirection/WorldRedirectionEditor.cs b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Editor/Redirection/WorldRedirectionEditor.cs index 4ecb7f2a..1aac198d 100644 --- a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Editor/Redirection/WorldRedirectionEditor.cs +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Editor/Redirection/WorldRedirectionEditor.cs @@ -25,6 +25,8 @@ public class WorldRedirectionEditor : Editor { SerializedProperty applySmoothing; SerializedProperty redirect; SerializedProperty direction; + SerializedProperty parameters; + SerializedObject parametersObject; readonly string[] strategyTechniques = { "Razzaque2001OverTimeRotation", "Razzaque2001Rotational", "Razzaque2001Curvature", "Razzaque2001Hybrid" }; readonly string[] targetsStrategies = { "SteerToCenter", "SteerToMultipleTargets" }; @@ -46,6 +48,9 @@ private void OnEnable() { applySmoothing = serializedObject.FindProperty("scene.applySmoothing"); redirect = serializedObject.FindProperty("redirect"); direction = serializedObject.FindProperty("scene.strategyDirection"); + + parameters = serializedObject.FindProperty("scene.parameters"); + parametersObject = new SerializedObject(parameters.objectReferenceValue); } public override void OnInspectorGUI() { @@ -54,6 +59,7 @@ public override void OnInspectorGUI() { GUI.enabled = true; serializedObject.Update(); + parametersObject.Update(); EditorGUILayout.PropertyField(technique, new GUIContent ("Technique")); if (strategyTechniques.Contains(technique.enumNames[technique.enumValueIndex])) { @@ -77,21 +83,54 @@ public override void OnInspectorGUI() { EditorGUILayout.Space(5); EditorGUILayout.LabelField("Technique Parameters", EditorStyles.boldLabel); + EditorGUILayout.PropertyField(parameters, new GUIContent("Parameters")); + + // WorldRedirection someComponent = target as WorldRedirection; + // // if (someComponent == null) + // // someComponent = CreateInstance(); + // Debug.Log(someComponent.scene); + // Debug.Log(someComponent.scene.parameters); + // Debug.Log(someComponent.scene.parameters.OverTimeRotation); + + if (new string[] {"Razzaque2001OverTimeRotation", "Razzaque2001Hybrid"}.Contains(technique.enumNames[technique.enumValueIndex])) { + EditorGUILayout.PropertyField(parametersObject.FindProperty("OverTimeRotation"), new GUIContent("Over Time Rotation Rate")); + } + if (new string[] { "Razzaque2001Rotational", "Razzaque2001Hybrid" }.Contains(technique.enumNames[technique.enumValueIndex])) { + EditorGUILayout.PropertyField(parametersObject.FindProperty("GainsRotational"), new GUIContent("Rotational Gains")); + } + if (new string[] { "Razzaque2001Curvature", "Razzaque2001Hybrid" }.Contains(technique.enumNames[technique.enumValueIndex])) { + EditorGUILayout.PropertyField(parametersObject.FindProperty("CurvatureRadius"), new GUIContent("Curvature Radius")); + } + if (technique.enumNames[technique.enumValueIndex] == "Razzaque2001Hybrid") { + // TODO: Radio list to choose which techniques to activate + } + // if (technique.enumNames[technique.enumValueIndex] == "Azmandian2016World") { + // EditorGUILayout.PropertyField(parametersObject.FindProperty("GainsRotational"), new GUIContent("Gains Rotational")); + // } + if (technique.enumNames[technique.enumValueIndex] == "Steinicke2008Translational") { + EditorGUILayout.PropertyField(parametersObject.FindProperty("GainsTranslational"), new GUIContent("Translational Gains")); + } + EditorGUILayout.PropertyField(redirect, new GUIContent("Redirect")); // Hides targets, dampening and smoothing if if (strategyTechniques.Contains(technique.enumNames[technique.enumValueIndex])) { if (targetsStrategies.Contains(strategy.enumNames[strategy.enumValueIndex])) { + EditorGUILayout.Space(5); + EditorGUILayout.LabelField("Strategy Parameters", EditorStyles.boldLabel); EditorGUILayout.PropertyField(targetsScene, new GUIContent ("Targets")); EditorGUILayout.PropertyField(applyDampening, new GUIContent("Apply Dampening")); EditorGUILayout.PropertyField(applySmoothing, new GUIContent("Apply Smoothing")); } else if (strategy.enumNames[strategy.enumValueIndex] == "SteerInDirection") { + EditorGUILayout.Space(5); + EditorGUILayout.LabelField("Strategy Parameters", EditorStyles.boldLabel); EditorGUILayout.PropertyField(direction, new GUIContent ("Direction")); } } serializedObject.ApplyModifiedProperties(); + parametersObject.ApplyModifiedProperties(); } } } \ No newline at end of file diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Literature Parameters.asset b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/High Parameters (Literature).asset similarity index 96% rename from Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Literature Parameters.asset rename to Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/High Parameters (Literature).asset index b70c5e3f..efebcfb9 100644 --- a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Literature Parameters.asset +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/High Parameters (Literature).asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e581f0f440a7c904aa70c37c0de08866, type: 3} - m_Name: Literature Parameters + m_Name: High Parameters (Literature) m_EditorClassIdentifier: HorizontalAngles: left: -4.38 diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Literature Parameters.asset.meta b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/High Parameters (Literature).asset.meta similarity index 100% rename from Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Literature Parameters.asset.meta rename to Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/High Parameters (Literature).asset.meta diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Recommended Parameters.asset b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Low Parameters.asset similarity index 96% rename from Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Recommended Parameters.asset rename to Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Low Parameters.asset index 82792f59..f27ae8da 100644 --- a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Recommended Parameters.asset +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Low Parameters.asset @@ -10,7 +10,7 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: e581f0f440a7c904aa70c37c0de08866, type: 3} - m_Name: Recommended Parameters + m_Name: Low Parameters m_EditorClassIdentifier: HorizontalAngles: left: -4.38 diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Low Parameters.asset.meta b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Low Parameters.asset.meta new file mode 100644 index 00000000..d112121c --- /dev/null +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Low Parameters.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9f380bb30ef76841bcbb50214a9509b +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Medium Parameters (Recommended).asset b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Medium Parameters (Recommended).asset new file mode 100644 index 00000000..d17a9220 --- /dev/null +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Medium Parameters (Recommended).asset @@ -0,0 +1,43 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!114 &11400000 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e581f0f440a7c904aa70c37c0de08866, type: 3} + m_Name: Medium Parameters (Recommended) + m_EditorClassIdentifier: + HorizontalAngles: + left: -4.38 + right: 3.81 + VerticalAngles: + up: 4.48 + down: -4.4 + Gain: + faster: 1.07 + slower: 0.88 + RedirectionBuffer: 0.1 + MaxRedirectionThreshold: 0.5 + GoGoCoefficient: 1 + GoGoActivationDistance: 0.167 + ResetRedirectionCoeff: 0.087 + RotationalError: 0.5 + RotationThreshold: 0 + WalkingThreshold: 0.2 + DampeningDistanceThreshold: 1.25 + DampeningRange: 1.57 + SmoothingFactor: 0.2 + OverTimeRotation: 1 + GainsTranslational: {x: 1, y: 1, z: 1} + GainsRotational: + same: 1.05 + opposite: 0.975 + CurvatureRadius: 15 + a: {x: 0, y: 0, z: 0} + SwampSquareLength: 0.25 + SwampCDRatio: 0.75 diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Recommended Parameters.asset.meta b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Medium Parameters (Recommended).asset.meta similarity index 100% rename from Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Recommended Parameters.asset.meta rename to Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/Medium Parameters (Recommended).asset.meta diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/ParametersToolkit.cs b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/ParametersToolkit.cs index e155b510..9d3da469 100644 --- a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/ParametersToolkit.cs +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Utils/Parameters/ParametersToolkit.cs @@ -24,6 +24,8 @@ public class ParametersToolkit: ScriptableObject { [Tooltip("Coefficient that controls the amount of redirection to remove according to the real hand translation when selecting the ResetRedirection technique. Value is in XXXX.")] // TODO check this public float ResetRedirectionCoeff = 0.087f; + + [Header("World Warping")] [Tooltip("The error in rotation where users are considered to be in the correct direction. Value is in °.")] public float RotationalError = 0.5f; @@ -47,12 +49,16 @@ public class ParametersToolkit: ScriptableObject { [Tooltip("The maximum gain in rotation that can be applied to the user's point of view in rotation. Value has no unit and is not a percentage. [Steinicke et al., 2010]")] public Vector2Rotation GainsRotational; [Tooltip("The maximum gain in translation that can be applied to the user's point of view in rotation. Value is in °/m and is not a percentage.")] - public float CurvatureRadius = 7.5f; + public float CurvatureRadius = 15f; + + [Header("3D Interpolation")] [Tooltip("")] public Vector3 a; + + [Header("Pseudo-Haptic")] [Tooltip("The size of the area around the origin where the Swamp illusion defined by [Lécuyer et al., 2000] is applied. Value is in m.")] public float SwampSquareLength = 0.25f; diff --git a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Visualisation/Socket.cs b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Visualisation/Socket.cs index 74fabf07..fd6d1d17 100644 --- a/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Visualisation/Socket.cs +++ b/Visuo-haptic Toolkit/Assets/Visuo-Haptic Toolkit/Scripts/Visualisation/Socket.cs @@ -49,9 +49,7 @@ private void Start() { private void StartSendingMessages() { if (client == null || !client.Connected) { try { - client = new TcpClient("localhost", 13000) { - ReceiveTimeout = 500 - }; + client = new TcpClient("localhost", 13000); startTime = DateTime.Now; } catch (SocketException) {}