Mouse Control Overhaul

Plugins + Scripts Mouse Control Overhaul

Download [<1 MB]
Note:
  • Works as session plugin.
  • I dont have VR, so I can't test how this plugin works with it.
  • Need to disable MacGruber's PowerHandles plugin because it's logic is already implemented here and they are interfere with each other.

Plugin contains few scripts:​

1. Mouse Control:​

Custom hover selection:​

  • Choosing the closest controller to mouse position in screen space using mouse location and radius which depends of fov and distance to controller.
  • Scale 1.0 is about radius of rectangular controller icon of Empty or CUA Atom.
  • Ignoring hidden controllers (default implementation allowing to drag and select hidden controllers).
  • Ignoring default style cycle through few near controllers (using C button) because it is garbage and very strange idea in such big radius.
MouseControlOverhaul-HoverSelection3.gif

Custom cycle through nearest:​

  • Can help if controllers are super close to each other in screen space. For example, you have few atoms at zero position.
  • Controllers are count nearest when you barely can see difference in the overlapping icons (about 2 pixels on example image).
  • Selected controller can be hovered if no other controllers are close enough to mouse, allowing user to select another controller in the same location.
MouseControlOverhaul-CycleDistance.jpg

Drag Activation Distance:​

  • Default drag activates when mouse moves quite far away from previous position in one tick.
  • This one checking distance from pressed position to current mouse position in screen space.
MouseControlOverhaul-Drag2.gif

Custom Select From Scene Mode:​

  • Replaced standard button callbacks with custom ones:
    • Link To Rigidbody
    • Align To Rigidbody
    • Parent Atom
    • Move Receiver Controller (AnimationPattern)
    • Force Receiver Rigidbody (CycleForce, GrabPoint, RhythmForce, SyncForce)
  • If controller and it's ForceReceiver are very close, priority will be for controller, use Cycle hotkey to select ForceReceiver.
  • When many controllers and ForceReceivers are close, firstly cyclic selection will be from nearest controllers, then from nearest ForceReceivers.
  • When any SelectFromSceneMode is active Gizmo's handles will be hidden.
  • Unfortunately can't modify PossesAndAlignHead menu button because it is calling HeadPossess, which is private.
MouseControlOverhaul-SelectFromScene2.jpg

Changeable hotkeys​

Nothing to show here


2. HandlesControl:​

Global Axis Mode:​

  • Local/Global axis mode can be toggled by ToggleAxisMode hotkey and inverted by HoldAxisMode hotkey while holding.
Nothing to show here

Handles Mode:​

  • Hold:
    • You need to Hold hotkey to enable position or rotation handle, otherwise it will be disabled.
  • Press:
    • You need to Press hotkey to choose which handle will be active: None, Position, Rotation.
  • Toggle:
    • You need to Press hotkey to switch between Positioin and Rotation handles.
MouseControlOverhaul-Axes.gif

Changeable hotkeys​

Nothing to show here

3. HoveredObjectNameDisplay:​

Help Text:​

  • Hovered controller's name is showing as help text at left of main HUD.
MouseControlOverhaul-Names2.gif

Mouse Cursor Text:​

  • Display name of hovered atom and controller under mouse cursor.
  • If displayed text moves lower than the edge of the screen, it will be displayed above mouse cursor.
  • Horizontal position of text depends of mouse cursor on screen.
MouseControlOverhaul-HoveredObjectNameDisplay-MouseCursorText2.gif
MouseControlOverhaul-HoveredObjectNameDisplay-MouseCursorText-Bottom2.gif

4. AutoUnfocusInputField:​

By default, when you finish writing text in an input field by Enter, the system still have this field focused and blocking default keyboard control.

5. DisableNavigationLookOnGUIPress:​

Press Right and Middle mouse buttons on GUI disabling mouse navigation, so you cannot move and rotate camera look.

!Attention!​

Conflicts with plugins which changing GlobalSceneOptions.singleton.disableNavigation variable, for example:
  • Keybindings
  • Embody
But you can disable this subplugin (and reload keybindings to set correct value of disableNavigation variable)


Small Tweaks:​

  • Gizmo is deselecting if mouse on GUI.
  • Dragging radius of selected controller covering full gizmo circle if RotationHandle is active, if not it is using SelectedDragScale value.
  • Stop dragging if application window lost focus.
  • Escape button by default cancelling current selection or closing menu if nothing selected.
  • Fixed MacGruber's hack to make Empty atom's sphere renderer visible only when collision is enabled and current menu is SelectedOptions (like default one).
  • Pressing right or middle mouse button on GUI disabling mouse navigation, so you will not rotate camera while doing something in menu.
  • Changing GameMode to Play cancels SelectFromSceneMode.
  • Selected controller is always visible to understand where is it.
  • In GlobalAxisMode resetting rotation after dragging is finished.
  • Do not process mouse logic (hovering, selecting, start dragging) when any modifier key is holding (control, shift, alt, windows, command, apple).
    • Allows you to use modifier+click combinations in other plugins.

Hints:​

  • If you don't plan to use FreeMode (Tab button) and you are using Keybindings plugin, you can remove this button and assing Tab for ToggleAxisMode.
  • For high resolution monitors you may need to increase DragActivationPixelDistance.

Knowing Issues:​

  • LookAtTrigger does not work.
    • Cannot use default variables and methods.
    • I haven't seen anyone use it, so likely you will not notice it.
  • I don't like how handle's grid mode works (it is just rounding all coordinates even when you moving along one axis), so i disabled it.
  • Menu button PossesAndAlignHead calling method HeadPossess, which is private, so I cannot use it.
  • DisableNavigationLookOnGUIPress conflicts with plugins, which changing GlobalSceneOptions.singleton.disableNavigationvariable.
    • You can disable this subplugin and reload other plugin, which changing variable to make it correct.
    • Embody plugin:
      • Exiting embody mode, sometimes causes to disable the option toggle mouse lock. (Thanks ccammell)
    • Keybindings plugin:
      • Default VAM keybindings works too

Little Issues:​

  • Cursor blinking when I am trying to hide it every frame, so I don't hide it at all.
  • Switching to FreeMode sometimes causes the controllers to be hidden for one frame.
  • Switching ShowHiddenAtoms causes the controllers to be hidden for one frame.
  • In FreeMode when you move cursor above gui, a blue circle should be visible.
  • In Global Axis Mode when selected controller changed, you can see gizmo in local axis for one frame.

Mouse Control UI:​

MouseControlOverhaul-MouseControl-Menu2.jpg

Handles Control UI:​

MouseControlOverhaul-HandlesControl-Menu2.jpg

Hovered Object Name Display UI:​

MouseControlOverhaul-HoveredObjectNameDisplay-Menu.jpg
Images and attachments
  • Finally2.jpg
    Finally2.jpg
    43.6 KB · Views: 0

Share this resource

Latest updates

  1. Fixed bugs with deleting selected object, updated AutoUnfocusInputField script.

    MouseControl: Fixed bug when you deleting selected object with hotkey: Previously you could see...
  2. Display hovered object's name under mouse cursor, cleanup, fixes

    Do not process mouse logic (hovering, selecting, start dragging) when any modifier key is...
  3. Fixed some bugs

    Fixed error when SuperController.GetAllFreeControllers() contains null items (Deleting CUA with...

Latest reviews

Neutral
Version: 10
Posted:
How do I push the hand away from me or pull it closer towards me while in first-person mode? Is this feature available at all?
Datel
Datel
I didn't quite understand the question. The plugin improves the default controls in desktop mode, making it easier to select and move Atom controllers. In this mode, the camera is always in first-person. If you're referring to personpossession and you're using VR, that's a completely different matter. It's better to ask about the plugin and its functionality in discussion or private message.
Upvote 0
Positive
Version: 10
Posted:
very! very good!
Datel
Datel
Thank you)
Upvote 0
Positive
Version: 9
Posted:
Absolute must have for VaM. The atom selection on mouse hover alone is so so much better. Thank you so much!!
Datel
Datel
I'm glad you found it and will have a better experience)
Upvote 0
Positive
Version: 9
Posted:
this is pure gold
Datel
Datel
Thank you much)
Upvote 0
Positive
Version: 9
Posted:
This is the most practical one. After so many years, I finally have the ability to accurately select controllers
Datel
Datel
I'm glad to read this, good luck with your work)
Upvote 0
Positive
Version: 9
Posted:
This plugin completely changes the experience. It's a total must-have. I can't live without it now. It's been exactly what I needed for a long time. Especially since the update with the info that pops up when you mouse over a node. Totally awesome! I think I even shouted when I saw the info pop up. Thank you so much.
Datel
Datel
Thank you much for such positive review, I'm glad to make work more comfortable)
Upvote 0
Positive
Version: 8
Posted:
After 7 years, finally:raised_hands:
Datel
Datel
Yeah, finally)
Upvote 2
Positive
Version: 8
Posted:
this is what the universe intended. thanks Datel 🙏✨
Datel
Datel
Welcome)
Upvote 1
Positive
Version: 7
Posted:
Absolute game changer. Thank you so much
Datel
Datel
Welcome, glad you found this plugin)
Upvote 0
Positive
Version: 7
Posted:
Thank you, with my highest respect.
Datel
Datel
Welcome)
Upvote 0
Back
Top Bottom