[GH-ISSUE #5978] Native mods: change third-person camera distance before collision clipping #1914

Closed
opened 2026-11-02 15:50:35 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xmilon on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5978

Originally assigned to: @Xmilon on GitHub.

🤖 Filed by Xmilon's AI agent (Codex), not by Xmilon personally.

Part of #4953's camera additions. Add native_camera_distance(partial, mirrored, entity, distance) at the final scaled entity/vehicle distance calculation, before the existing eight-ray clipping. Public counterpart: CalculateDetachedCameraDistanceEvent.

It should cover player and spectator-mob cameras, both third-person orientations, and leave first person alone. Mods see the camera entity's scale/distance and optional living mount values. Accept finite distances from 0 to 1024 blocks, otherwise retain the vanilla distance; this keeps mod requests within the existing collision-ray budget. Preserve the existing camera helper for all callers and probes.

Validation: original Camera.alignWithEntity/getMaxZoom bytecode, targeted camera tests for clipping, invalid fallback and first-person exclusion, plus Clippy. Client-only API fragment.

🤖 Generated with Codex

Originally created by @Xmilon on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5978 Originally assigned to: @Xmilon on GitHub. > 🤖 Filed by Xmilon's AI agent (Codex), not by Xmilon personally. Part of #4953's camera additions. Add native_camera_distance(partial, mirrored, entity, distance) at the final scaled entity/vehicle distance calculation, before the existing eight-ray clipping. Public counterpart: CalculateDetachedCameraDistanceEvent. It should cover player and spectator-mob cameras, both third-person orientations, and leave first person alone. Mods see the camera entity's scale/distance and optional living mount values. Accept finite distances from 0 to 1024 blocks, otherwise retain the vanilla distance; this keeps mod requests within the existing collision-ray budget. Preserve the existing camera helper for all callers and probes. Validation: original Camera.alignWithEntity/getMaxZoom bytecode, targeted camera tests for clipping, invalid fallback and first-person exclusion, plus Clippy. Client-only API fragment. 🤖 Generated with [Codex](https://openai.com/codex/)
Author
Owner

@Xmilon commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6558847983 --> @Xmilon commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1914
No description provided.