I’m making a Unity game that touch both side objects with 2 players like this picture.
I’m using SegmentPaint.cs, but the problem is Right player touches the object on the left.
Can I give GameCollider’s tags differently for both players?
Using a skeleton allows to distinguish, but player’s feet are not well recognized.
You can use the data from nuitrack.UserFrame (see the script
SegmentPaint.cs), where each element of the array is the user id.
More details: http://download.3divi.com/Nuitrack/doc/classnuitrack_1_1UserFrame.html
Knowing that, you can separate the interaction of objects through layers or tags at the Unity level.
You can use our tutorial for reference: http://download.3divi.com/Nuitrack/doc/UnitySegment_page.html
For your case, you need to modify the
UpdateFrame method in the
GameColliders.cs script so that colliderObjects [c, r] receives a tag, a layer or any other identifying parameter according to the
userId for the current pixel.