Skip to content

Support independent rotation axis binding - #232

Closed
rsdadada wants to merge 1 commit into
xTracr:26.1/devfrom
rsdadada:codex/independent-rotation-axis-binding
Closed

Support independent rotation axis binding#232
rsdadada wants to merge 1 commit into
xTracr:26.1/devfrom
rsdadada:codex/independent-rotation-axis-binding

Conversation

@rsdadada

@rsdadada rsdadada commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • split model rotation binding into independent pitch, yaw, and roll controls
  • add a continuous Y-X-Z Euler lift for partial-axis binding
  • preserve the exact existing behavior when all rotation axes are bound or all are unbound
  • migrate legacy JSON and binary configs while retaining codec 703 reads
  • add localized UI tooltips and narration

Motivation

As discussed in #17, one rotation matrix can have multiple equivalent Euler representations. That ambiguity is harmless while applying all three components, but it becomes visible when components are selected independently.

This PR defines an explicit policy for partial binding: evaluate both equivalent Y-X-Z branches, unwrap them against the previous frame, and choose the nearest branch. At ±90° pitch, the previous frame fixes the otherwise unobservable yaw/roll split. After a lifecycle reset, vanilla camera orientation is used as the initial reference.

This implements the independent-axis alternative mentioned in #64. It does not claim to recover separate head and body transforms from one flattened model matrix.

Compatibility

  • mask 000: returns vanilla pitch/yaw/roll exactly
  • mask 111: returns the previous principal Euler extraction exactly
  • legacy JSON bindRotation maps to all three new flags
  • new JSON also writes a conservative legacy flag using pitch && yaw && roll
  • binary codec 704 stores all six position/rotation flags; codec 703 remains readable
  • the legacy four-boolean BindConfig constructor and bindRotation() accessor remain available
  • rotation offsets keep their existing local rigid-transform semantics

The public record now has six components, so consumers reflecting over record components will observe the expanded shape.

Validation

  • .\gradlew.bat clean build --no-daemon
  • Fabric and NeoForge artifacts built successfully
  • Fabric client loaded RealCamera 0.7.9-beta through GUI atlas creation with no RealCamera/Mixin injection errors

Related to #17 and #64.

@rsdadada
rsdadada marked this pull request as ready for review July 10, 2026 13:59
@rsdadada
rsdadada force-pushed the codex/independent-rotation-axis-binding branch from 4e16197 to a2766d0 Compare July 10, 2026 14:05
@rsdadada rsdadada closed this Jul 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant