Trying to recreate SenselContacts example for Unity and "contacts" doesn't return a value


I am trying to recreate the SenselContacts.cs example for Unity.
I’ve had success displaying force values with the script, however, for some reason, the number of contacts and everything connected to that (positions etc.) returns empty. I have attached the script, could you please take a look what am I doing wrong?


Hello, thanks for contacting us. All you need to do is change:
Sensel.senselSetFrameContent(_handle, 1);
Sensel.senselSetFrameContent(_handle, 5);

SetFrameContent changes the data that is sent in each frame by way of a bitmask. 1 is force values, 2 is labels (force frame split into contacts), 4 is contacts and 8 is the accelerometer.

1 Like

Oh, how did I miss that. Thank you!

If anyone needed the SenselContacts example for Unity, here you go. This script prints out the input ID, xPos, yPos, total force, and area.

Twitter RSS Facebook