Skip to content

Commit cba24db

Browse files
committed
Improved haptics of button and Tutorial
1 parent 8f5367d commit cba24db

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Assets/Materials/coreMaterials/coreMat.mat

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ Material:
1313
m_LightmapFlags: 1
1414
m_EnableInstancingVariants: 1
1515
m_DoubleSidedGI: 0
16-
m_CustomRenderQueue: 2000
17-
stringTagMap:
18-
RenderType: Opaque
16+
m_CustomRenderQueue: -1
17+
stringTagMap: {}
1918
disabledShaderPasses: []
2019
m_SavedProperties:
2120
serializedVersion: 3

Assets/Scripts/Tutorials/tutorialPanel.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public override void onTouch(bool on, manipulator m)
7474
if (m.emptyGrab)
7575
{
7676
setActivated(true);
77-
m.hapticPulse(700);
77+
m.hapticPulse(2000);
7878
}
7979
}
8080
}

Assets/Scripts/UI/button.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,16 @@ public override void setState(manipState state) {
200200

201201
public override void onTouch(bool on, manipulator m) {
202202
if (m != null) {
203-
if (m.emptyGrab) {
203+
if (m.emptyGrab) {
204204
if (!on) {
205205
if (!isToggle) keyHit(false);
206206
if (!glowMatOnToggle) {
207207
rend.material = offMat;
208208
}
209209
} else {
210+
211+
m.hapticPulse();
212+
210213
if (isToggle) {
211214
toggled = !toggled;
212215
if (toggled) keyHit(true);

0 commit comments

Comments
 (0)