Skip to content

Commit d671fd5

Browse files
Stephen HodgsonStephen Hodgson
authored andcommitted
GestureManipulator.cs fixed PascalCasing. GstureManager.cs fixed regression of current Interaction Source in manipulation update
1 parent d6583e2 commit d671fd5

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Assets/HoloToolkit/Input/Scripts/GestureManager.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ namespace HoloToolkit.Unity
1818
/// information about the manipulation gesture via ManipulationOffset and ManipulationHandPosition.
1919
///
2020
/// Editor and Companion App Input can also be used by assigning a keyboard select key and
21-
/// using the right mouse button to select the currently focused object. Using Gestures with
22-
/// mouse is currently not supported.
21+
/// using the right mouse button to select the currently focused object.
22+
///
23+
/// Using Gestures with mouse is currently not supported.
2324
/// </remarks>
2425
[RequireComponent(typeof(GazeManager))]
2526
public partial class GestureManager : Singleton<GestureManager>
@@ -218,14 +219,13 @@ private void InteractionManager_SourcePressed(InteractionSourceState state)
218219
pressedInteractionSource.Add(state.source.id);
219220
}
220221

221-
// If we're not currently processing a manipulation then start.
222+
// Don't start another manipulation gesture if one is already underway.
222223
if (!ManipulationInProgress)
223224
{
224225
// Cache our current source state for use later.
225226
currentInteractionSourceState = state;
226227

227228
// Gesture Support for Controllers: (i.e. Clicker, Xbox Controller, etc.)
228-
// Don't start another manipulation gesture if one is already underway.
229229
if (state.source.kind == InteractionSourceKind.Controller)
230230
{
231231
OnManipulation(inProgress: true, offset: ManipulationPosition);
@@ -249,6 +249,8 @@ private void InteractionManager_SourceUpdated(InteractionSourceState state)
249249
// Check the current interaction source matches our cached value.
250250
if (ManipulationInProgress && state.source.id == currentInteractionSourceState.source.id)
251251
{
252+
currentInteractionSourceState = state;
253+
252254
// Gesture Support for Controllers: (i.e. Clicker, Xbox Controller, etc.)
253255
if (state.source.kind == InteractionSourceKind.Controller)
254256
{

Assets/HoloToolkit/Input/Scripts/GestureManipulator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace HoloToolkit.Unity
2222
public class GestureManipulator : MonoBehaviour
2323
{
2424
[Tooltip("How much to scale each axis of movement (camera relative) when manipulating the object")]
25-
public Vector3 positionScale = new Vector3(2.0f, 2.0f, 4.0f); // Default tuning values, expected to be modified per application
25+
public Vector3 PositionScale = new Vector3(2.0f, 2.0f, 4.0f); // Default tuning values, expected to be modified per application
2626

2727
private Vector3 initialManipulationPosition;
2828

@@ -95,7 +95,7 @@ private void Update()
9595
// the source is lost and the gesture completes. To improve the usability of the gesture we scale each
9696
// axis of movement by some amount (camera relative). This value can be changed in the editor or
9797
// at runtime based on the needs of individual movement scenarios.
98-
Vector3 scaledLocalPositionDelta = Vector3.Scale(initialToCurrentPosition, positionScale);
98+
Vector3 scaledLocalPositionDelta = Vector3.Scale(initialToCurrentPosition, PositionScale);
9999

100100
// Once we've figured out how much the object should move relative to the camera we apply that to the initial
101101
// camera relative position. This ensures that the object remains in the appropriate location relative to the camera

0 commit comments

Comments
 (0)