Skip to content

Commit

Permalink
fix(SDK): ensure consistent button mapping on oculus touch for steamvr
Browse files Browse the repository at this point in the history
  > **Breaking Changes**

Oculus Touch through SteamVR exposes the additional touch buttons but
also maps the Vive application menu button through to `Button Two` on
the Touch controller. This means that the Menu button in the
Controller Events script now should be set to `Button Two` and SteamVR
SDK now treats `Button Two` as the application menu button.

This will break things for some users if they have Button One mapped
as the menu button, because on button one isn't associated to any
button on the Vive wand.

The Oculus Touch also has a different controller model through SteamVR
and therefore the SteamVR Controller SDK script now listens for the
connected headset and provides different paths and colliders for the
controller based on which one is connected.

The Oculus Touch models are also at a rotated orientation even though
their forward matches the Vive wand, which means things like the
pointers are all out of alignment. To solve this, a custom transform
is returned for the pointer origin if the Rift is being used with
SteamVR.
  • Loading branch information
thestonefox committed Jan 21, 2017
1 parent cd828d6 commit b94b981
Show file tree
Hide file tree
Showing 61 changed files with 7,407 additions and 7,080 deletions.
356 changes: 173 additions & 183 deletions Assets/VRTK/Examples/002_Controller_Events.unity

Large diffs are not rendered by default.

356 changes: 173 additions & 183 deletions Assets/VRTK/Examples/003_Controller_SimplePointer.unity

Large diffs are not rendered by default.

356 changes: 173 additions & 183 deletions Assets/VRTK/Examples/004_CameraRig_BasicTeleport.unity

Large diffs are not rendered by default.

360 changes: 177 additions & 183 deletions Assets/VRTK/Examples/005_Controller_BasicObjectGrabbing.unity

Large diffs are not rendered by default.

360 changes: 177 additions & 183 deletions Assets/VRTK/Examples/006_Controller_UsingADoor.unity

Large diffs are not rendered by default.

366 changes: 183 additions & 183 deletions Assets/VRTK/Examples/007_CameraRig_HeightAdjustTeleport.unity

Large diffs are not rendered by default.

304 changes: 149 additions & 155 deletions Assets/VRTK/Examples/008_Controller_UsingAGrabbedObject.unity

Large diffs are not rendered by default.

358 changes: 178 additions & 180 deletions Assets/VRTK/Examples/009_Controller_BezierPointer.unity

Large diffs are not rendered by default.

363 changes: 180 additions & 183 deletions Assets/VRTK/Examples/010_CameraRig_TerrainTeleporting.unity

Large diffs are not rendered by default.

302 changes: 147 additions & 155 deletions Assets/VRTK/Examples/012_Controller_PointerWithAreaCollision.unity

Large diffs are not rendered by default.

360 changes: 177 additions & 183 deletions Assets/VRTK/Examples/013_Controller_UsingAndGrabbingMultipleObjects.unity

Large diffs are not rendered by default.

360 changes: 177 additions & 183 deletions Assets/VRTK/Examples/014_Controller_SnappingObjectsOnGrab.unity

Large diffs are not rendered by default.

356 changes: 173 additions & 183 deletions Assets/VRTK/Examples/015_Controller_TouchpadAxisControl.unity

Large diffs are not rendered by default.

360 changes: 177 additions & 183 deletions Assets/VRTK/Examples/016_Controller_HapticRumble.unity

Large diffs are not rendered by default.

368 changes: 185 additions & 183 deletions Assets/VRTK/Examples/017_CameraRig_TouchpadWalking.unity

Large diffs are not rendered by default.

350 changes: 170 additions & 180 deletions Assets/VRTK/Examples/018_CameraRig_FramesPerSecondCounter.unity

Large diffs are not rendered by default.

304 changes: 149 additions & 155 deletions Assets/VRTK/Examples/019_Controller_InteractingWithPointer.unity

Large diffs are not rendered by default.

357 changes: 177 additions & 180 deletions Assets/VRTK/Examples/020_CameraRig_MeshTeleporting.unity

Large diffs are not rendered by default.

354 changes: 174 additions & 180 deletions Assets/VRTK/Examples/021_Controller_GrabbingObjectsWithJoints.unity

Large diffs are not rendered by default.

364 changes: 181 additions & 183 deletions Assets/VRTK/Examples/022_Controller_CustomBezierPointer.unity

Large diffs are not rendered by default.

365 changes: 180 additions & 185 deletions Assets/VRTK/Examples/023_Controller_ChildOfControllerOnGrab.unity

Large diffs are not rendered by default.

116 changes: 57 additions & 59 deletions Assets/VRTK/Examples/024_CameraRig_ExcludeTeleportLocations.unity
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,35 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: c63141da60241d14394f8f3b547531f0, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!21 &94299833
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Sprites/Default
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: PixelSnap
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!1 &101068864
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -424,6 +453,7 @@ MonoBehaviour:
m_Bits: 4
pointerLength: 10
pointerDensity: 10
collisionCheckFrequency: 0
beamCurveOffset: 1
beamHeightLimitAngle: 100
rescalePointerTracer: 0
Expand All @@ -449,7 +479,7 @@ MonoBehaviour:
grabToggleButton: 7
useToggleButton: 3
uiClickButton: 3
menuToggleButton: 12
menuToggleButton: 14
axisFidelity: 1
triggerClickThreshold: 1
gripClickThreshold: 1
Expand All @@ -470,6 +500,7 @@ MonoBehaviour:
buttonOneTouched: 0
buttonTwoPressed: 0
buttonTwoTouched: 0
startMenuPressed: 0
pointerPressed: 0
grabPressed: 0
usePressed: 0
Expand Down Expand Up @@ -537,6 +568,9 @@ MonoBehaviour:
headsetPositionCompensation: 1
targetListPolicy: {fileID: 160572243}
navMeshLimitDistance: 0
layersToIgnore:
serializedVersion: 2
m_Bits: 4
--- !u!114 &160572245
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -555,6 +589,9 @@ MonoBehaviour:
movementThreshold: 0.0015
standingHistorySamples: 5
leanYThreshold: 0.5
layersToIgnore:
serializedVersion: 2
m_Bits: 4
fallRestriction: 0
gravityFallYThreshold: 1
blinkYThreshold: 0.15
Expand Down Expand Up @@ -899,35 +936,6 @@ MeshFilter:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 602196322}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!21 &644717420
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Sprites/Default
m_Shader: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_CustomRenderQueue: -1
stringTagMap: {}
m_SavedProperties:
serializedVersion: 2
m_TexEnvs:
- first:
name: _MainTex
second:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- first:
name: PixelSnap
second: 0
m_Colors:
- first:
name: _Color
second: {r: 1, g: 1, b: 1, a: 1}
--- !u!1 &716897211
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1222,6 +1230,7 @@ MonoBehaviour:
m_Bits: 4
pointerLength: 10
pointerDensity: 10
collisionCheckFrequency: 0
beamCurveOffset: 1
beamHeightLimitAngle: 100
rescalePointerTracer: 0
Expand All @@ -1247,7 +1256,7 @@ MonoBehaviour:
grabToggleButton: 7
useToggleButton: 3
uiClickButton: 3
menuToggleButton: 12
menuToggleButton: 14
axisFidelity: 1
triggerClickThreshold: 1
gripClickThreshold: 1
Expand All @@ -1268,6 +1277,7 @@ MonoBehaviour:
buttonOneTouched: 0
buttonTwoPressed: 0
buttonTwoTouched: 0
startMenuPressed: 0
pointerPressed: 0
grabPressed: 0
usePressed: 0
Expand Down Expand Up @@ -1361,7 +1371,6 @@ GameObject:
m_Component:
- 4: {fileID: 1140714267}
- 20: {fileID: 1140714271}
- 114: {fileID: 1140714270}
- 114: {fileID: 1140714269}
- 92: {fileID: 1140714268}
m_Layer: 0
Expand Down Expand Up @@ -1409,18 +1418,6 @@ MonoBehaviour:
index: 0
origin: {fileID: 0}
isValid: 0
--- !u!114 &1140714270
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 11420968, guid: 4d293c8e162f3874b982baadd71153d2,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1140714266}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: be96d45fe21847a4a805d408a8015c84, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!20 &1140714271
Camera:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1581,7 +1578,6 @@ MonoBehaviour:
_head: {fileID: 1140714267}
_ears: {fileID: 1428189911}
wireframe: 0
flip: {fileID: 0}
--- !u!124 &1219140708
Behaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1674,6 +1670,7 @@ MonoBehaviour:
boundariesSDK: 1
headsetSDK: 1
controllerSDK: 1
autoManageScriptDefines: 1
actualBoundaries: {fileID: 1360725294}
actualHeadset: {fileID: 1219140705}
actualLeftController: {fileID: 1360725296}
Expand Down Expand Up @@ -1831,22 +1828,22 @@ MonoBehaviour:
size: 0
color: {r: 0, g: 1, b: 1, a: 1}
vertices:
- {x: 1.0500001, y: 0.01, z: -0.90000015}
- {x: -1.0500001, y: 0.01, z: -0.90000015}
- {x: -1.0500001, y: 0.01, z: 0.90000015}
- {x: 1.0500001, y: 0.01, z: 0.90000015}
- {x: 1.2, y: 0.01, z: -1.0500002}
- {x: -1.2, y: 0.01, z: -1.0500002}
- {x: -1.2, y: 0.01, z: 1.0500002}
- {x: 1.2, y: 0.01, z: 1.0500002}
- {x: 0.5, y: 0.01, z: -0.5}
- {x: -0.5, y: 0.01, z: -0.5}
- {x: -0.5, y: 0.01, z: 0.5}
- {x: 0.5, y: 0.01, z: 0.5}
- {x: 0.65, y: 0.01, z: -0.65}
- {x: -0.65, y: 0.01, z: -0.65}
- {x: -0.65, y: 0.01, z: 0.65}
- {x: 0.65, y: 0.01, z: 0.65}
--- !u!33 &1360725303
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 3380982, guid: 4d293c8e162f3874b982baadd71153d2,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1360725294}
m_Mesh: {fileID: 1591506257}
m_Mesh: {fileID: 1728375814}
--- !u!23 &1360725304
MeshRenderer:
m_ObjectHideFlags: 0
Expand All @@ -1861,7 +1858,7 @@ MeshRenderer:
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_Materials:
- {fileID: 644717420}
- {fileID: 94299833}
m_SubsetIndices:
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
Expand Down Expand Up @@ -1892,6 +1889,7 @@ MonoBehaviour:
left: {fileID: 1360725296}
right: {fileID: 1360725295}
objects: []
assignAllBeforeIdentified: 0
--- !u!114 &1360725306
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2459,7 +2457,7 @@ MeshFilter:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1585021955}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!43 &1591506257
--- !u!43 &1728375814
Mesh:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
Expand All @@ -2475,7 +2473,7 @@ Mesh:
vertexCount: 8
localAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.2, y: 0, z: 1.0500002}
m_Extent: {x: 0.65, y: 0, z: 0.65}
m_Shapes:
vertices: []
shapes: []
Expand Down Expand Up @@ -2527,7 +2525,7 @@ Mesh:
format: 0
dimension: 0
m_DataSize: 288
_typelessdata: 6766863f0ad7233c696666bf000000000000803f0000803f0000803f0000000000000000676686bf0ad7233c696666bf000000000000803f0000803f0000803f0000803f00000000676686bf0ad7233c6966663f000000000000803f0000803f0000803f00000000000000006766863f0ad7233c6966663f000000000000803f0000803f0000803f0000803f000000009a99993f0ad7233c686686bf000000000000803f0000803f00000000000000000000803f9a9999bf0ad7233c686686bf000000000000803f0000803f000000000000803f0000803f9a9999bf0ad7233c6866863f000000000000803f0000803f00000000000000000000803f9a99993f0ad7233c6866863f000000000000803f0000803f000000000000803f0000803f
_typelessdata: 0000003f0ad7233c000000bf000000000000803f0000803f0000803f0000000000000000000000bf0ad7233c000000bf000000000000803f0000803f0000803f0000803f00000000000000bf0ad7233c0000003f000000000000803f0000803f0000803f00000000000000000000003f0ad7233c0000003f000000000000803f0000803f0000803f0000803f000000006666263f0ad7233c666626bf000000000000803f0000803f00000000000000000000803f666626bf0ad7233c666626bf000000000000803f0000803f000000000000803f0000803f666626bf0ad7233c6666263f000000000000803f0000803f00000000000000000000803f6666263f0ad7233c6666263f000000000000803f0000803f000000000000803f0000803f
m_CompressedMesh:
m_Vertices:
m_NumItems: 0
Expand Down Expand Up @@ -2582,7 +2580,7 @@ Mesh:
m_UVInfo: 0
m_LocalAABB:
m_Center: {x: 0, y: 0.01, z: 0}
m_Extent: {x: 1.2, y: 0, z: 1.0500002}
m_Extent: {x: 0.65, y: 0, z: 0.65}
m_MeshUsageFlags: 0
m_BakedConvexCollisionMesh:
m_BakedTriangleCollisionMesh:
Expand Down
Loading

0 comments on commit b94b981

Please sign in to comment.