Improve camera panning
* add camera panning speed option to camera settings context menu * add relative panning speed based on distance to camera target to camera settings context menu * add relative panning option to camera settings context menu * fix float comparisons * remove invert panning entry from view widget * remove unused show/hide method for camera widget
This commit is contained in:
@@ -259,7 +259,10 @@ namespace FlaxEditor.Viewport.Cameras
|
||||
// Pan
|
||||
if (input.IsPanning)
|
||||
{
|
||||
var panningSpeed = 0.8f;
|
||||
var panningSpeed = (Viewport.RelativePanning)
|
||||
? Mathf.Abs((position - TargetPoint).Length) * 0.005f
|
||||
: Viewport.PanningSpeed;
|
||||
|
||||
if (Viewport.InvertPanning)
|
||||
{
|
||||
position += up * (mouseDelta.Y * panningSpeed);
|
||||
|
||||
Reference in New Issue
Block a user