This document is about: FUSION 2
SWITCH TO

MX Ink Integration

Fusion XR prototyping addons

This addon demonstrates how to integrate the Logitech MX Ink pen into a Fusion project.

It includes the Unity integration package, with modifications to handle specific error cases, such as when the Meta SDK is not installed, the pen is unavailable, or when subclassing some components is necessary.

Content

HardwareMXPen

The HardwareMXPen component provides minor modifications to its parent class VrStylusHandler, which is part of Logitech's Unity integration package.

Mostly, it allows forced emulation of an MX Ink pen presence in the editor, with two options:

  • forceRightHandPen: when set to true, in the editor, the right controller in the editor will be treated as an MX Ink pen, regardless of the actual hardware.

  • forcedHandPenIsAController: by default, the tip pressure input corresponds to the controller's x-axis stick position, where no pressure gives a value of 1, and maximum pressure gives a value of 0. When set to true, this logic is reversed, allowing a resting controller to avoid constant drawing. If false, the default logic is applied, enabling a standard MX Ink pen to behave as expected.

The HardwareMXPen should be placed on a hardware rig to detect a local pen.
Like VrStylusHandler, it requires left_touch_controller and right_touch_controller references, so the controller is hidden when a pen is detected instead.

NetworkMXPen

The NetworkMXPen class drives a sibling NetworkLineDrawer from the LineDrawing addon.

The current implementation follows this logic:

  • Adds a drawing point whenever the MX Ink pen's pressure or tip button is pressed, initiating a drawing and/or line as needed.
  • Stops the current line if pressure on both buttons is zero.
  • Stops the current drawing when a button adjacent to the pressure button is pressed.
  • Stops the current drawing if the stylus is no longer detected.

This class also controls which parts of the network rig to hide when the MX Ink pen substitutes for a hand. This configuration can be automated when using NetworkHand components by setting the automaticallyDetectNetworkHands property to true.

Dependencies

Demo

A demo scene can be found in the Assets\Photon\FusionAddons\MXInkIntegration\Demo\ folder.

Please note that to test this demo scene, the Meta packages must be installed in the project.
Alternatively, you can use the Meta XR integration project (which includes the Meta packages) to test it directly.

Download

This addon latest version is included into the free XR addon project

Supported topologies

  • shared mode

Changelog

  • Version 2.0.2: Fix dependencies check
  • Version 2.0.1:
    • Add collider to prefab, and some fixes to ensure BlockingContact compatibility
    • Add feedback class
  • Version 2.0.0: First release
Back to top