Skip to content

Commit

Permalink
Dial notch stronger haptics, touched environment a bit, Oscillator mo…
Browse files Browse the repository at this point in the history
…ved switch.
  • Loading branch information
ludzeller committed Jan 26, 2022
1 parent 3cecde2 commit c61fea3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 30 deletions.
36 changes: 18 additions & 18 deletions Assets/Prefabs/environment/Floor.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Transform:
- {fileID: 4171040702118896079}
- {fileID: 3734892502196975510}
- {fileID: 8047393139643567634}
- {fileID: 415997788408217172}
- {fileID: 6719174038844998600}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -244,54 +244,54 @@ MeshRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &3449231672249966255
--- !u!1 &1023643230035894300
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 415997788408217172}
- component: {fileID: 821032024429251235}
- component: {fileID: 2297517962735990812}
- component: {fileID: 4440453231792290802}
- component: {fileID: 6719174038844998600}
- component: {fileID: 7119619858923844047}
- component: {fileID: 8469406596264120663}
- component: {fileID: 2425458744785309331}
m_Layer: 0
m_Name: Cylinder (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
--- !u!4 &415997788408217172
--- !u!4 &6719174038844998600
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3449231672249966255}
m_GameObject: {fileID: 1023643230035894300}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3.17, y: 1.63, z: -3.12}
m_LocalScale: {x: 1, y: 1.7864, z: 1}
m_LocalPosition: {x: -3.99, y: 2.858, z: -2.01}
m_LocalScale: {x: 0.71172, y: 3.1156063, z: 0.71172}
m_Children: []
m_Father: {fileID: 168691358241275537}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &821032024429251235
--- !u!33 &7119619858923844047
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3449231672249966255}
m_GameObject: {fileID: 1023643230035894300}
m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &2297517962735990812
--- !u!23 &8469406596264120663
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3449231672249966255}
m_GameObject: {fileID: 1023643230035894300}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
Expand Down Expand Up @@ -324,13 +324,13 @@ MeshRenderer:
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!136 &4440453231792290802
--- !u!136 &2425458744785309331
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3449231672249966255}
m_GameObject: {fileID: 1023643230035894300}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
Expand Down Expand Up @@ -523,8 +523,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7994328210485235899}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2.15, y: 1.63, z: 2.45}
m_LocalScale: {x: 1, y: 1.7864, z: 1}
m_LocalPosition: {x: 2.36, y: 2.858, z: 2.45}
m_LocalScale: {x: 0.71172, y: 3.1156063, z: 0.71172}
m_Children: []
m_Father: {fileID: 168691358241275537}
m_RootOrder: 5
Expand Down
10 changes: 5 additions & 5 deletions Assets/Resources/Prefabs/Oscillator.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1000010450949100}
m_LocalRotation: {x: -0.5, y: -0.5, z: -0.5, w: 0.5}
m_LocalPosition: {x: 0.0555, y: 0.0327, z: 0.0275}
m_LocalPosition: {x: 0.053, y: -0.0003, z: 0.0275}
m_LocalScale: {x: 0.75, y: 0.75, z: 0.75}
m_Children:
- {fileID: 4000013961779218}
Expand Down Expand Up @@ -2862,8 +2862,8 @@ MonoBehaviour:
prevShakeRot: 0
fineMult: 5
controllerRot: 0
notched: 0
steps: 4
isNotched: 0
notchSteps: 4
--- !u!1 &1000013495723170
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -3549,8 +3549,8 @@ MonoBehaviour:
prevShakeRot: 0
fineMult: 5
controllerRot: 0
notched: 0
steps: 4
isNotched: 0
notchSteps: 4
--- !u!1 &1436940005579262
GameObject:
m_ObjectHideFlags: 0
Expand Down
10 changes: 6 additions & 4 deletions Assets/Scripts/UI/dial/dial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public class dial : manipObject {
public float prevShakeRot = 0f;
public float fineMult = 5f;

public bool isNotched = false;
public int notchSteps = 4;

public override void Awake() {
base.Awake();

Expand Down Expand Up @@ -162,9 +165,8 @@ public override void setState(manipState state) {
}
}

public bool isNotched = false;
public int notchSteps = 4;



public override void grabUpdate(Transform t)
{
Vector2 temp = dialCoordinates(manipulatorObj.up);
Expand Down Expand Up @@ -199,7 +201,7 @@ public override void grabUpdate(Transform t)
// haptics
if (Mathf.Abs(realRot - prevShakeRot) > 10f)
{
if (manipulatorObjScript != null) manipulatorObjScript.hapticPulse(500);
if (manipulatorObjScript != null) manipulatorObjScript.hapticPulse( isNotched ? (ushort) 3999 : (ushort) 700); // 3999 is max power
prevShakeRot = realRot;
turnCount++;
}
Expand Down
7 changes: 4 additions & 3 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.22
preloadedAssets: []
bundleVersion: 0.23
preloadedAssets:
- {fileID: 8207365043489784020, guid: 93c4f4428c8e3814dbf9d469c39e85d4, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
Expand Down Expand Up @@ -168,7 +169,7 @@ PlayerSettings:
tvOS: com.oculus.UnitySample
buildNumber:
iPhone: 0
AndroidBundleVersionCode: 22
AndroidBundleVersionCode: 23
AndroidMinSdkVersion: 23
AndroidTargetSdkVersion: 0
AndroidPreferredInstallLocation: 0
Expand Down

0 comments on commit c61fea3

Please sign in to comment.