diff --git a/src/optitrack.cpp b/src/optitrack.cpp index 2e8f87a..d5a4e5c 100644 --- a/src/optitrack.cpp +++ b/src/optitrack.cpp @@ -113,6 +113,13 @@ namespace libmotioncapture { int type = 0; memcpy(&type, ptr, 4); ptr += 4; // printf("Type : %d\n", i, type); + if ((major == 4 && minor >= 1) || major > 4) + { + // If the NatNet version is 4.1 or greater, next four bytes represent + // the number of bytes in the dataset. Just skip them. + ptr += 4; + } + if(type == 0) // markerset { ptr += strlen(ptr) + 1; // name