Skip to content

Commit

Permalink
Invert zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
maikramer committed Feb 23, 2019
1 parent 7e6371d commit 7c18310
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
16 changes: 0 additions & 16 deletions Assets/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,6 @@ GameObject:
- component: {fileID: 1433099826}
- component: {fileID: 1433099825}
- component: {fileID: 1433099822}
- component: {fileID: 1433099828}
- component: {fileID: 1433099824}
- component: {fileID: 1433099823}
m_Layer: 0
Expand Down Expand Up @@ -1503,21 +1502,6 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1433099828
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1433099821}
m_Enabled: 0
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: ce1a852aa7cacc84dbd3f3ee806d59f1, type: 3}
m_Name:
m_EditorClassIdentifier:
KeyToHold:
MouseButtonPan: 2
--- !u!1001 &1463534581
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
8 changes: 4 additions & 4 deletions Assets/MainScene/Volume Profile.asset
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ MonoBehaviour:
m_Value: 0
hdriSky:
m_OverrideState: 1
m_Value: {fileID: 8900000, guid: d179a5cf97a39ec5c91cb199d742898a, type: 3}
m_Value: {fileID: 8900000, guid: 8e1bb831e41d99e6fbf3cc4a6447012b, type: 3}
--- !u!114 &-5821385101070672208
MonoBehaviour:
m_ObjectHideFlags: 3
Expand Down Expand Up @@ -431,7 +431,7 @@ MonoBehaviour:
m_AdvancedMode: 0
maxShadowDistance:
m_OverrideState: 1
m_Value: 20
m_Value: 25
min: 0
cascadeShadowSplitCount:
m_OverrideState: 0
Expand Down Expand Up @@ -520,7 +520,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 384c4d03a551c44448145f4093304119, type: 3}
m_Name: ScreenSpaceReflection
m_EditorClassIdentifier:
active: 1
active: 0
m_AdvancedMode: 0
depthBufferThickness:
m_OverrideState: 0
Expand All @@ -534,7 +534,7 @@ MonoBehaviour:
max: 1
minSmoothness:
m_OverrideState: 0
m_Value: 0.9
m_Value: 0.335
min: 0
max: 1
smoothnessFadeStart:
Expand Down
5 changes: 3 additions & 2 deletions Assets/Scripts/Utillity/ObjectZoomPanRotate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

#endregion

public class ObjectZoomPanRotate : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerEnterHandler,
public class ObjectZoomPanRotate : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler,
IPointerEnterHandler,
IPointerExitHandler
{
private Vector2 _lastMousePos;
Expand Down Expand Up @@ -66,7 +67,7 @@ private void Update()
Physics.Raycast(ray, out var hit);
var direction = hit.point - _camera.transform.position;
var scrollWheel = Input.GetAxis("Mouse ScrollWheel");
_camera.transform.Translate(direction * scrollWheel * 3f);
_camera.transform.Translate(direction * -scrollWheel * 3f);
}
}

Expand Down

0 comments on commit 7c18310

Please sign in to comment.