Skip to content

Commit

Permalink
Merge pull request #38 from microdee/develop
Browse files Browse the repository at this point in the history
syncing master
  • Loading branch information
microdee authored Mar 5, 2021
2 parents 289c2e5 + 46ed1ad commit a5a8125
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
## SpaceMouse camera controller for UE4 editor viewports

**Pre-Compiled for UE 4.23 .. 4.26.**

**Compatible with UE 4.26 and below**
**Compiled for UE 4.23 .. 4.26.**
Demo video: https://youtu.be/Qibig0gQWvE

**[Download manually for free](https://github.com/microdee/UE4-SpaceMouse/releases/latest)**

**[Buy it via the Marketplace](https://www.unrealengine.com/marketplace/en-US/product/spacemouse-for-unreal-engine)**

Demo video: https://youtu.be/Qibig0gQWvE
**If you have a code project just use this repo as submodule**
```
git submodule add https://github.com/microdee/UE4-SpaceMouse.git Plugins/SpaceMouse
```

## [Disclaimer about the new official plugin shipped by 3DConnexion](DISCLAIMER.md)

Expand Down Expand Up @@ -62,6 +66,10 @@ This plugin works with the HID device directly so no 3DxWare service is needed t

[UE4 forum (please prefer Github Discussions)](https://forums.unrealengine.com/unreal-engine/feedback-for-epic/437-support-for-space-navigator-3d-mouse?p=1609440#post1609440)

## Build a release

If for any reason you cannot use this plugin as a submodule and you want to make a pre-built release to be an engine plugin, then work with the [official test project](https://github.com/microdee/UE4-SpaceMouse-TestProject) and see the build instructions there.

## Major changes from version 1.1

Upon updating from prior versions please delete both HIDUE and SpaceMouse plugins from your Engine or Project plugins folder!
Expand Down
18 changes: 9 additions & 9 deletions Source/SpaceMouse/Private/SmEditorManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ void FSmEditorManager::ManageActiveViewport()
}
bWasOrbitCamera = cvp->ShouldOrbitCamera();
bWasRealtime = cvp->IsRealtime();
cvp->ToggleOrbitCamera(false);
cvp->SetRealtime(true);
//cvp->ToggleOrbitCamera(false);
//cvp->SetRealtime(true);
ActiveViewportClient = cvp;
break;
}
Expand Down Expand Up @@ -166,11 +166,9 @@ FVector FSmEditorManager::GetOrbitingPosDeltaOffset(FRotator rotDelta, float for
ActiveViewportClient->GetViewRotation().RotateVector(LastOrbitPivotView);
}
}
if(LastOrbitDistance > 0)
{
LastOrbitDistance -= forwardDelta;
LastOrbitPivotView.X -= forwardDelta;
}

LastOrbitDistance -= forwardDelta;
LastOrbitPivotView.X -= forwardDelta;

if(OrbitingOverlay) OrbitingOverlay->Draw(LastOrbitPivot, LastOrbitDistance);

Expand Down Expand Up @@ -222,14 +220,16 @@ void FSmEditorManager::MoveActiveViewport(FVector trans, FRotator rot)
if (OnMovementStartedFrame && ActiveViewportClient)
{
bWasRealtime = ActiveViewportClient->IsRealtime();
bWasOrbitCamera = ActiveViewportClient->ShouldOrbitCamera();
ActiveViewportClient->ToggleOrbitCamera(false);
ActiveViewportClient->SetRealtime(true);
}

/*if (OnMovementEndedFrame && ActiveViewportClient)
if (OnMovementEndedFrame && ActiveViewportClient)
{
ActiveViewportClient->SetRealtime(bWasRealtime);
}*/
//ActiveViewportClient->ToggleOrbitCamera(bWasOrbitCamera);
}

if (ActiveViewportClient && Enabled)
{
Expand Down

0 comments on commit a5a8125

Please sign in to comment.