promotional bannermobile promotional banner

Figura + Sable Seated Camera Fix

Fixes Figura avatars' camera turning twice when seated on Sable sub-levels.

# Figura + Sable Seated Camera Fix

> **Note:** This mod was made with the help of AI (Anthropic's Claude), including its code.
> If you are not comfortable using AI-assisted mods, please do not use this mod.

A small client-side compatibility fix for **Figura** and **Sable** (the physics library used by Create Aeronautics and others).

## The problem
When you **sit on a Sable sub-level** (for example a seat on a ship) while using a **Figura avatar that has a script**, the camera is rotated by the sub-level's rotation **twice**.

- In first person, your crosshair points one way while your body faces another (often diagonally backwards).
- In third person, your body appears turned relative to the camera.
- The offset equals the ship's own rotation, so it changes as the ship turns.

It does **not** happen when standing on a sub-level, sitting on the ground, or without a scripted avatar.

## Why it happens
1. While you are seated on a sub-level, Sable applies the sub-level rotation inside `Camera.setRotation` and writes the resulting world-space angles back to the camera.
2. Right after that, Figura reads the camera angles back, adds the avatar's camera rotation (if any) and calls `setRotation` again.
3. Sable applies the sub-level rotation to those already-rotated angles a second time.

## What this mod does
It makes Figura's second call reproduce the previous call, plus only what the avatar asked for:
- **Avatars that don't touch the camera:** the result is exactly the same as without Figura.
- **`renderer:setOffsetCameraRot`:** the offset is applied on top of the normal view, relative to the sub-level.
- **`renderer:setCameraRot`:** the fixed angle is used relative to the sub-level, the same way Sable treats the vanilla camera.

## Safe by design
The mod only steps in when **all** of these are true. Otherwise the game behaves as if it were not installed:
- the camera angles were actually changed by another mod after the last `setRotation` call,
- the call comes from Figura's camera handler,
- Figura's avatar data can be read.

If Figura or Sable fix this themselves, or their internals change, the mod simply stays inactive. It never stops the game from launching.

## Details
- **Client-side only.** Not needed on servers.
- No hard dependencies. It does nothing without both Figura and Sable.
- Unofficial fix, not affiliated with the Figura or Sable projects.

## Tested with
- Minecraft 1.21.1 / NeoForge 21.1.265
- Figura 0.1.6
- Sable 2.0.6

Figura + Sable Seated Camera Fix Team

profile avatar
  • 1
    Followers
  • 4
    Projects
  • 42.4K
    Downloads

More from user_39toanl5mcds34ih