Skip to content

Commit f26e3e4

Browse files
dooly123claude
andcommitted
Force-enable leg IK when foot driver active, fix gizmo visibility
Desktop mode never sets HasRigLayer on foot bones (only trackers do), so EnableLeftLeg/EnableRightLeg stayed false and the IK solver skipped legs entirely. Now force-enables leg IK per-frame in SimulateIKDestinations when the foot driver is initialized and not seated. Moved foot gizmos from OnDrawGizmosSelected to OnDrawGizmos so they render without requiring the EventDriver to be selected in hierarchy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d62d03b commit f26e3e4

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

Basis/Packages/com.basis.eventdriver/BasisEventDriver.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,11 @@ public void OnDrawGizmos()
275275
if (BasisLocalPlayer.PlayerReady)
276276
{
277277
BasisHintOffsetGizmos.DrawAll();
278+
if (SMModuleDebugOptions.UseGizmos && BasisLocalPlayer.Instance?.BasisLocalFootDriver != null
279+
&& BasisLocalPlayer.Instance.BasisLocalFootDriver.IsInitialized)
280+
{
281+
BasisLocalPlayer.Instance.BasisLocalFootDriver.DrawGizmos();
282+
}
278283
}
279284
#endif
280285
}
@@ -286,10 +291,6 @@ public void OnDrawGizmosSelected()
286291
if (BasisLocalPlayer.PlayerReady)
287292
{
288293
BasisPlayerInteract.DrawAll();
289-
if (SMModuleDebugOptions.UseGizmos && BasisLocalPlayer.Instance?.BasisLocalFootDriver != null)
290-
{
291-
BasisLocalPlayer.Instance.BasisLocalFootDriver.DrawGizmos();
292-
}
293294
}
294295
#endif
295296
}

Basis/Packages/com.basis.framework/Drivers/Local/BasisLocalRigDriver.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,18 @@ public void SimulateIKDestinations(float deltaTime)
295295

296296
BasisFullBodyData data = BasisFullIKConstraint.data;
297297

298+
// Force-enable leg IK when the foot driver is active (desktop mode has no rig
299+
// layers for feet, so HasRigLayer is false and legs would never be IK-driven).
300+
if (localPlayer != null && localPlayer.BasisLocalFootDriver != null
301+
&& localPlayer.BasisLocalFootDriver.IsInitialized
302+
&& !localPlayer.LocalSeatDriver.IsSeated)
303+
{
304+
data.EnableLeftLeg = true;
305+
data.EnableRightLeg = true;
306+
data.EnableLeftLowerLeg = true;
307+
data.EnableRightLowerLeg = true;
308+
}
309+
298310
// Init fallback state once (so first frame doesn't lerp from zero)
299311
if (!hasFallbackState)
300312
{

0 commit comments

Comments
 (0)