Use pressure Wacom at runtime


I need to use a Wacom device at runtime on UE4 more precisely I want to use the pressure. I didn’t found the input event.
Before link a third party, I prefer ask you the question.

Best regards

You can read Pressure value from viewport

But not sure is support for it is implemented to platform you trying to use, if it returns 0 all the time and IsPenActive always is false it means it’s not implemnted. In that case you can read pan pressure from system APIs since Windows it self support it (Windows 7 and up), in case Windows search for Win32 APIs, it’s a lot easier to do calls there from UE4 then uses external library. This seems to be good starting point (rember that tablets are attached to touch systems):

Thank you for this answer :slight_smile:
It’s exactly that I want.

[EDIT] : In fact it’s dosen’t work :frowning:

I use this in my controller : ()->GetGameViewport()->Viewport->IsPenActive(); and IsPenActive return always 0.

Ok I check the UE4 implementation and I found this :frowning:

virtual float GetTabletPressure() { return 0.f; }
virtual bool IsPenActive() { return false; }

So it’s unimplemented.

Thats generic implementation, lot of core platfrom depended APIs overrides generic implementation (in case of Viewport they are implemented in RHI modules). But i also find only generic implementation of it, so i guess it’s not implemented. So you will need to talk to Windows directly, in UE4 you need to include windows.h in little diffrent way:

#include "AllowWindowsPlatformTypes.h"
#include <windows.h>
#include "HideWindowsPlatformTypes.h"

And google some tutorial how to get pressure from Windows API. Remeber by doing this you code will only build for Windows, or else you will do code filtring with



Ok I will test to override the event loop.
I will share my result.
Thank you :slight_smile: