• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
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

Controller's name:​

  • Hovered controller's name is showing as help text at left of main hud.
MouseControlOverhaul-Names2.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 handlers 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

Handlers Mode:​

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

Changeable hotkeys​

Nothing to show here

3. 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.

4. DisableNavigationLookOnGUIPress:​

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


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.

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 handler'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.

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-Menu.jpg

Handlers Control UI:​

MouseControlOverhaul-HandlesControl-Menu.jpg
  • Finally2.jpg
    Finally2.jpg
    43.6 KB · Views: 0

Share this resource

Latest updates

  1. Fixed some bugs

    Fixed error when SuperController.GetAllFreeControllers() contains null items (Deleting CUA with...
  2. Removed forgotten log. Selected controller scale moved to other plugin.

    Removed forgotten log on Empty selection. Removed changing selected controller scale, moved to...
  3. Separation into few scripts, Handle Axis Mode.

    Replaced Dictionary.Get method to fix "does not contain definition method" error which appears...

Latest reviews

Positive
Version: 8
Posted:
this is what the universe intended. thanks Datel 🙏✨
Datel
Datel
Welcome)
Upvote 0
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
Positive
Version: 7
Posted:
The gods will bless you sir.
Datel
Datel
Thank you)
Upvote 1
Positive
Version: 6
Posted:
VAM 2 should take notes, because this makes so much better to select parts, move and rotate. It makes everything as intuitive as it should be.
Datel
Datel
I hope they will make default mouse control better, but if not, someone should remake it again)
Upvote 1
Positive
Version: 6
Posted:
Would you make a guide video? I guess this tool is quite a useful one, but I don't understand what's it for and how to use it. Maybe you could show us some best practice through a guide video.
Datel
Datel
I'm not sure about guide video because you need to add this plugin as session plugin and it just works. It could be very short video. On plugin's page you can read what's it for and look at some images and gifs. Plugin itself also has many UI areas with description for every option.
Upvote 0
Positive
Version: 5
Posted:
Great Plugin. Thnx
Datel
Datel
Welcome)
Upvote 0
Positive
Version: 4
Posted:
Soooo much better than the original mouse selection!
Datel
Datel
Thank you much)
Upvote 0
Positive
Version: 4
Posted:
Many people have already said what a fantastic plugin this is, so I can only add that you are the best!
Datel
Datel
Thank you much, I'm glad it is so useful)
Upvote 0
Positive
Version: 3
Posted:
An angelic gift to relieve pain!
Datel
Datel
You are welcome)
Upvote 1
Back
Top Bottom