This commit is contained in:
ekrctb 2018-07-02 16:09:33 +09:00
parent 341ffa4667
commit 63746876c2
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ protected override bool OnMouseMove(InputState state)
// else it can have an annoying effect.
if (dragRotationState == DragRotationState.DragStarted && distance > 30)
dragRotationState = DragRotationState.Rotating;
// don't rotate when distance if zero to avoid NaN
// don't rotate when distance is zero to avoid NaN
if (dragRotationState == DragRotationState.Rotating && distance > 0)
{
Vector2 offset = state.Mouse.Position - positionMouseDown;