Skip to content

Commit 1f7d1fc

Browse files
committed
Accept pull-request #50
This closes #50, closes #45, closes #49,
2 parents 3bb4bac + 7a178ae commit 1f7d1fc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Assets/HTC.UnityPlugin/ViveInputUtility/Examples/3.3DDrag/Scripts/Draggable.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ public float hitDistance
9292
[FormerlySerializedAs("onDrop")]
9393
[SerializeField]
9494
private UnityEventDraggable m_onDrop = new UnityEventDraggable(); // change rigidbody drop velocity here
95+
[SerializeField]
96+
[FormerlySerializedAs("m_scrollDelta")]
97+
private float m_scrollingSpeed = 0.01f;
9598

9699
public bool isDragged { get { return isGrabbed; } }
97100

@@ -116,6 +119,8 @@ public float hitDistance
116119
[Obsolete("Use grabRigidbody instead")]
117120
public Rigidbody rigid { get { return grabRigidbody; } set { grabRigidbody = value; } }
118121

122+
public float scrollingSpeed { get { return m_scrollingSpeed; } set { m_scrollingSpeed = value; } }
123+
119124
protected override void Awake()
120125
{
121126
base.Awake();
@@ -193,7 +198,7 @@ protected virtual void Update()
193198
OnGrabTransform();
194199
}
195200

196-
var scrollDelta = currentGrabber.eventData.scrollDelta * 0.01f;
201+
var scrollDelta = currentGrabber.eventData.scrollDelta * m_scrollingSpeed;
197202
if (scrollDelta != Vector2.zero)
198203
{
199204
currentGrabber.hitDistance = Mathf.Max(0f, currentGrabber.hitDistance + scrollDelta.y);

Assets/HTC.UnityPlugin/ViveInputUtility/Scripts/VIUVersion.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ namespace HTC.UnityPlugin.Vive
66
{
77
public static class VIUVersion
88
{
9-
public static readonly Version current = new Version("1.8.3.2");
9+
public static readonly Version current = new Version("1.8.3.3");
1010
}
1111
}

0 commit comments

Comments
 (0)