mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
allow a single spine tracker to control the whole spine without warning
This commit is contained in:
1 parent
c30efd2317
commit
753fdb527e
3 files changed
+9
-13
No files matched your search
@@ -78,11 +78,10 @@ fun bodyPartPrerequisites(bodyPart: BodyPart, ikSolved: Set<BodyPart> = emptySet
|
||||
requirementGroups(bodyPart).filterNot { group -> group.all { it in ikSolved } }
|
||||
|
||||
private fun requirementGroups(bodyPart: BodyPart): List<List<BodyPart>> {
|
||||
val spineIndex = SPINE_IMPUTED_PARTS.indexOf(bodyPart)
|
||||
if (spineIndex >= 0) return listOfNotNull(SPINE_IMPUTED_PARTS.take(spineIndex).ifEmpty { null })
|
||||
|
||||
// The head roots the skeleton and the neck hangs off it, so neither waits on anything.
|
||||
if (bodyPart == BodyPart.HEAD || bodyPart == BodyPart.NECK) return emptyList()
|
||||
val standsAlone = bodyPart in SPINE_IMPUTED_PARTS ||
|
||||
bodyPart == BodyPart.HEAD ||
|
||||
bodyPart == BodyPart.NECK
|
||||
if (standsAlone) return emptyList()
|
||||
|
||||
return limbPrerequisites(bodyPart) + listOf(SPINE_IMPUTED_PARTS)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user