Fragment physics: per-bone joint limits (SIX-210) #277
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/holdmysocks--SixNG!277
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/277/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@holdmysocks on GitHub · 2026-11-25 13:55 UTC · original
holdmysocks:six-frag-joints→master· +176 −12 · 4 files · 3 commits · merged 2026-11-25 14:46 UTCJoint limits in the fragment
physicsblock (SIX-210). The physics version goes from 2 to 3.What changes
rotation_limitsandtranslation_limits. Each entry hasbone_name,bone_hash,group,minandmax.minandmaxgive one value per axis of the bone frame.bone_nameis the skeleton bone whose joaat matchesbone_hash.groupis the group whosename_hashmatches. It is null when the bone is not a group.jointsurveywrites every level fragment's joint arrays as jsonl.fraggroupsnow prints each group's bone flags and joint stiffness too.Where the data is
The main drawable (root +0x18) has a pointer at +0x90 to the joint data:
Each limit is 0x30 bytes: vec4 min, vec4 max, u32 joaat of the bone name, then zero padding.
Confirmed
On the 40,705 level fragments:
Lid.DoorMoverLimit, z from -90° to 90°Lidx from -90° to 0°,Handlex from -180° to 0°Units and frame (confirmed)
Root flags
has_joints; it is nowany_group_joint_angle_plastic_deflection, confirmed. The bit is set exactly when some group has tuning slot 16 above 0: all 1,066 fragments with it, none of the 39,639 without.has_breakable_groups, likely; the two bits share the name. They are set on all 11,950 multi-group fragments that have a group able to break off (strength ≥ 0). They are never set on single-group fragments, and only on 80 of the 1,921 multi-group fragments with no breakable group. Those 80 are mostly dishes, clocks, ATMs and cameras.Unnamed group bits, checked again
Each unnamed bit was compared with the joint limits, the bone flags, all 36 tuning values, the other flag bits and the parent group's flags. No bit has an exact match, so none is named. Two new patterns are recorded in the source:
motor_max_torqueabove 0.Also adds
jointbones, a research example that prints each limit with its bone's orientation, and each group's flag words, bone flags and tuning.Tests:
names_flag_bitscovers the new root names, with bits 16 and 24 giving one name.decodes_fragment_physicsnow builds a drawable with one rotation and one translation limit and checks the decode and the JSON. The sixng-core tests pass.