Skip to content

[FIX] Corrected limbs shift calculation in IKLimb. - #2118

Open
Neloreck wants to merge 1 commit into
OpenXRay:devfrom
xray-forge:dev-avoid-invalid-limbs-shift
Open

[FIX] Corrected limbs shift calculation in IKLimb.#2118
Neloreck wants to merge 1 commit into
OpenXRay:devfrom
xray-forge:dev-avoid-invalid-limbs-shift

Conversation

@Neloreck

Copy link
Copy Markdown
Contributor

Notes

  • Treats an unreachable foot goal as a fully extended leg instead of allowing the square-root input to become negative.

Changes

  • Clamps the IK leg-reach radicand before calculating the downward shift.
  • Ignores non-finite upward and downward limb-shift constraints.
  • Resets invalid persistent object_shift state and returns a zero shift.
  • Logs IK shift-state recovery in debug builds.

Context

  • Annoyed me since I compiled openxray first time.
  • Verified with mixed build - skadovsk is good place to check it with ramps/stairs/doors etc.
  • Removed verify, but added logs just in case. I think we can move it back to debug mode popup if anyone has preferences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant