MX Ink Integration
This add-on shows how to integrate the Logitech MX Ink pen in a Fusion project.
It includes the Unity integration package, with some modifications to handle special error cases if the Meta SDK is not installed, if the pen is not available, or to be able to sublcass some components.
Content
HardwareMXPen
The HardwareMXPen
component provides tiny modifications over its parent class VrStylusHandler
, provided in Logitech's nity integration package.
Mostly, it allows to force the emulation of a MX Ink presence in editor, with 2 options:
forceRightHandPen
: if true, in the editor, the right controller will be considered as a MX Pen, wheter it is really one or notforcedHandPenIsAController
: by default, the tip pressure input matches the controller x stick axis, no pressure being a 1 value on the axis, and the maximum pressure being a 0 value. If true, this logic is reversed, so that a resting controller can be used without drawing all the time. If fals,e the default logic is used, so that an actual MX Pen used as a controller will behave normally.
The HardwareMXPen
is supposed to be placed on an hardware rig, to detect a local pen.
As with the VrStylusHandler
, left_touch_controller
and right_touch_controller
have to be provided, so that the proper one is hidden when a pen instead of a controller is detected.
NetworkMXPen
The NetworkMXPen
class drives a sibling NetworkLineDrawer
from the LineDrawing add-on.
The current implementation has the following logic :
- add a drawing point when either the MX Ink pressure or tip buttons are pressed (and starts a drawing and/or a line if needed)
- stop the current line if the pressure on both buttons is 0
- stop the current drawing when a button next to the pressure button is pressed
- stop the current drawing if the stylus stops being detected
The class also handles specifying which part of the network rig to hide when the MX Ink replaces a hand. It can be automatically configured when using NetworkHand
components by setting the automaticallyDetectNetworkHands
value to true
Dependencies
Demo
A demo scene can be found in the Assets\Photon\FusionAddons\MXInkIntegration\Demo\
folder.
Download
This addon latest version is included into the free XR addon project
Supported topologies
- shared mode
Changelog
- Version 2.0.0: First release