Anchor Point Eye Fix

This commit is contained in:
Kam committed 2026-02-26 02:34:10 -05:00
1 parent 1cd629f39c
commit 8b1ef36dc5
2 files changed
+6 -3

No files matched your search

@@ -112,9 +112,12 @@ public class AnchorPointHelper {
break;
}
// Rotate offsets relative to entity's body yaw
// Rotate offsets relative to entity's yaw
// EYE anchor uses head yaw so offsets follow the look direction
// All other anchors use body yaw
// +X = entity's right, +Y = up, +Z = entity's forward
Vec3 rotatedOffset = rotateOffsetByYaw(anchorX * scale, anchorY * scale, anchorZ * scale, bodyYaw);
float offsetYaw = (anchor == AnchorPoint.EYE) ? headYaw : bodyYaw;
Vec3 rotatedOffset = rotateOffsetByYaw(anchorX * scale, anchorY * scale, anchorZ * scale, offsetYaw);
x += rotatedOffset.xCoord;
y += rotatedOffset.yCoord;
z += rotatedOffset.zCoord;