mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-20 09:01:20 -08:00
Just placeholder of the brainstorming for IK
This commit is contained in:
1 parent
588c8d9cc3
commit
d99a0a77a3
1 file changed
+14
-2
@@ -124,9 +124,21 @@ class ComputedSkeletonBehaviour(
|
||||
val targetState = receiver.context.state.value
|
||||
val processed = processors
|
||||
.filter { processor -> processor.enabled }
|
||||
.fold(targetState) { state, processor -> processor.process(state) }
|
||||
.fold(targetState) { state, processor -> processor.process(state) } // TODO: Add a constrain processor (maybe not needed)
|
||||
|
||||
val rootHead = Vector3(0f, targetState.skeletonHeight, 0f) // FIXME WRONG
|
||||
receiver.computed.value = buildBones(processed, rootHead = rootHead)
|
||||
val fk = buildBones(processed, rootHead = rootHead)
|
||||
|
||||
// val targetProcessors = [FloorClip, FloorSkating, ToePlant, FootPlant]
|
||||
//
|
||||
// val targets = targetProcessors
|
||||
// .filter { targetProcessors -> targetProcessors.enabled }
|
||||
// .fold(emptyList<Target>()) { targets, processor -> processor.process(fk, targets) }
|
||||
//
|
||||
// val ikOutput = solver.solve(fk, targets)
|
||||
|
||||
// receiver.computed.value = ikOutput
|
||||
receiver.computed.value = fk
|
||||
} catch (e: CancellationException) {
|
||||
throw e
|
||||
} catch (e: Exception) {
|
||||
|
||||
Reference in new issue
Block a user