Skip to content

Commit

Permalink
Merge pull request #1 from TheWizardsCode/NoFlyZoneIn2D
Browse files Browse the repository at this point in the history
Skip fly when in 2D Scene View
  • Loading branch information
SorraTheOrc authored Jan 11, 2022
2 parents 2cd5a7c + d6f2e95 commit 70d9ed0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Editor/ViewportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ static void Fly(SceneView sceneView)

static void Fly(SceneView sceneView, Vector3 translationInversion, Vector3 rotationInversion)
{
if (sceneView.in2DMode) return;

SyncRigWithScene();

// Apply inversion of axes for fly/grabmove mode.
Expand Down Expand Up @@ -433,4 +435,4 @@ private static Vector3 SnapOnTranslation(Vector3 v, float snap)
#endregion - Snapping -
}
}
#endif
#endif

0 comments on commit 70d9ed0

Please sign in to comment.