mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-20 17:11:20 -08:00
Fix bug with wrong trackers being read in skeleton if no leg trackers are attached
This commit is contained in:
1 parent
b4d07b0b7e
commit
57d009df5c
1 file changed
+4
@@ -8,6 +8,8 @@ public class TrackerUtils {
|
||||
}
|
||||
|
||||
public static <T extends Tracker> T findTrackerForBodyPosition(T[] allTrackers, TrackerPosition position) {
|
||||
if(position == null)
|
||||
return null;
|
||||
for(int i = 0; i < allTrackers.length; ++i) {
|
||||
T t = allTrackers[i];
|
||||
if(t != null && t.getBodyPosition() == position)
|
||||
@@ -17,6 +19,8 @@ public class TrackerUtils {
|
||||
}
|
||||
|
||||
public static <T extends Tracker> T findTrackerForBodyPosition(List<T> allTrackers, TrackerPosition position) {
|
||||
if(position == null)
|
||||
return null;
|
||||
for(int i = 0; i < allTrackers.size(); ++i) {
|
||||
T t = allTrackers.get(i);
|
||||
if(t != null && t.getBodyPosition() == position)
|
||||
|
||||
Reference in new issue
Block a user