mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
Don't mark occluded tracker bone as inactive
This commit is contained in:
1 parent
1d2b6295c9
commit
2acf7804d8
1 file changed
+7
-4
@@ -24,10 +24,13 @@ class TrackerToSkeletonBehaviour : TrackerBehaviour {
|
||||
.onEach { _ ->
|
||||
// Tell the skeleton the tracker has stopped sending data to the last bone it was sending data to.
|
||||
lastBodyPartSent?.let {
|
||||
receiver.appContext.skeleton.context.dispatch(
|
||||
SkeletonActions.DisableBone(it),
|
||||
)
|
||||
lastBodyPartSent = null
|
||||
val trackerState = receiver.context.state.value
|
||||
if ((!trackerState.status.isActive() && trackerState.status != TrackerStatus.OCCLUDED) || trackerState.bodyPart != lastBodyPartSent) {
|
||||
receiver.appContext.skeleton.context.dispatch(
|
||||
SkeletonActions.DisableBone(it),
|
||||
)
|
||||
lastBodyPartSent = null
|
||||
}
|
||||
}
|
||||
}
|
||||
.flatMapLatest { _ ->
|
||||
|
||||
Reference in new issue
Block a user