Wacom Tablet Example not showing pen location

Wacom tablet connects and positions are registered in the readout, and button presses are detected, but the prefab does not respond. When connecting there are references to BT and LE as bluetooth options. I am not using the 3D pen, is that a requirement?
Thanks
See video: ML 20221006 14 46 50 - YouTube

2022.2.0b9

0.53.3
Windows 10

2 Likes

Hi @johnhanacek,

Thank you for bringing this to our attention - I've just tested it and get the same behavior. This will be filed as a bug and corrected in a future release.

1 Like

Hi @johnhanacek,

I was able to visualize the wacom tablet and pen's input after I modified WacomTabletVisualizer.cs.
The problem of the script is the position and rotation calculation.

I have to fix the script from line 106 to line 113.
This is the original code,

            // Set the location of the pen.
            _pen.localPosition = new Vector3(wacomTabletExample.Position.x / -7.75f, 
                wacomTabletExample.Distance / 100, 
                wacomTabletExample.Position.y / 13.25f);

            // Set the rotation of the pen.
            _pen.localRotation = Quaternion.Euler(-90, 0, 0) * 
                                 Quaternion.Euler(wacomTabletExample.PenTilt.y, wacomTabletExample.PenTilt.x * -1, 0);

And this is the code I modified.

            // Set the location of the pen.
            _pen.localPosition = new Vector3((wacomTabletExample.Position.x - 719/2) / (719/2) * -0.1325f,
                wacomTabletExample.Distance / 100,
                (wacomTabletExample.Position.y + 918/2) / (-918/2) * 0.0775f);

            // Set the rotation of the pen.
            _pen.localRotation = Quaternion.Euler(-90, 0, 0) * 
                                 Quaternion.Euler(wacomTabletExample.PenTilt.y / Mathf.PI * 180, wacomTabletExample.PenTilt.x / Mathf.PI * 180, 0);

The value 719 is the height and 918 is the width of my Wacom Tablet in mm, so please modify these values if differs.

The tablet I used is Wacom Intuos Pro Model PPTH-660.

Hope this helps.

1 Like