PDollar-Unity icon indicating copy to clipboard operation
PDollar-Unity copied to clipboard

IndexOutOfRangeException: Index was outside the bounds of the array.

Open HoussemEJ opened this issue 3 years ago • 0 comments

Reproduce this error by performing a gesture which has only 1 point. The error comes from this line [1] when the index value is -1. After further investigation I found out that creating a gesture via new Gesture(Points) will return a gesture with an array points initialized with NaN values.

[1] https://github.com/DaVikingCode/PDollar-Unity/blob/43f069d4aab9dd5013bc630fdfbe8056e36bda35/Assets/PDollar/Scripts/PDollarGestureRecognizer/PointCloudRecognizer.cs#L148

HoussemEJ avatar Aug 27 '22 11:08 HoussemEJ