File tree 2 files changed +7
-2
lines changed
Assets/HTC.UnityPlugin/ViveInputUtility
Examples/3.3DDrag/Scripts
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,9 @@ public float hitDistance
92
92
[ FormerlySerializedAs ( "onDrop" ) ]
93
93
[ SerializeField ]
94
94
private UnityEventDraggable m_onDrop = new UnityEventDraggable ( ) ; // change rigidbody drop velocity here
95
+ [ SerializeField ]
96
+ [ FormerlySerializedAs ( "m_scrollDelta" ) ]
97
+ private float m_scrollingSpeed = 0.01f ;
95
98
96
99
public bool isDragged { get { return isGrabbed ; } }
97
100
@@ -116,6 +119,8 @@ public float hitDistance
116
119
[ Obsolete ( "Use grabRigidbody instead" ) ]
117
120
public Rigidbody rigid { get { return grabRigidbody ; } set { grabRigidbody = value ; } }
118
121
122
+ public float scrollingSpeed { get { return m_scrollingSpeed ; } set { m_scrollingSpeed = value ; } }
123
+
119
124
protected override void Awake ( )
120
125
{
121
126
base . Awake ( ) ;
@@ -193,7 +198,7 @@ protected virtual void Update()
193
198
OnGrabTransform ( ) ;
194
199
}
195
200
196
- var scrollDelta = currentGrabber . eventData . scrollDelta * 0.01f ;
201
+ var scrollDelta = currentGrabber . eventData . scrollDelta * m_scrollingSpeed ;
197
202
if ( scrollDelta != Vector2 . zero )
198
203
{
199
204
currentGrabber . hitDistance = Mathf . Max ( 0f , currentGrabber . hitDistance + scrollDelta . y ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ namespace HTC.UnityPlugin.Vive
6
6
{
7
7
public static class VIUVersion
8
8
{
9
- public static readonly Version current = new Version ( "1.8.3.2 " ) ;
9
+ public static readonly Version current = new Version ( "1.8.3.3 " ) ;
10
10
}
11
11
}
You can’t perform that action at this time.
0 commit comments