Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Incompatibility with all forms of Figura, Isolated source issue already, just don't know how directly to implement to your upstream #136

Open
OracleHisty opened this issue Jan 17, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@OracleHisty
Copy link

Describe the bug
Figura incompatibility because of incorrect pivot reference

To Reproduce
Steps to reproduce the behavior:

  1. Add Figura and Better Combat to your instance.
  2. Use a model that is not the vanilla player, but utilizes the "vanilla" rig (provided below as an alternative resource for reproduction)
  3. Refer to "LeftItemPivot" or "RightItemPivot" GROUPs in blockbench.
  4. All things work, except the rotation pivots for non-vanilla models.

Expected behavior
Rotation Pivots should be correctly applied inside figura when using this format, but do not properly use them as pivot reference points

Screenshots

Image

Setup config (minecraft, modloader, libraries):

  • Minecraft version: 1.20.1 -> 1.21.x
  • Mod loader: Any Supported by Player-Animator and Better Combat (Figura is modloader agnositic using Architectury)
  • PlayerAnimator Library version (Latest, per individual test)
  • MC library version Architectury

**Other mods
Figura
Better Combat (the mod requiring the pivot references)
**

Optional:
** Used library methods:
I have attempted to fix this is an upstream figura build, and I found that it is neither better combat, nor figura, but instead upstream player-animator.

utilized examples:
working example, uses vanilla player instead, opting not to replace it:
no_elytra.zip

Blockbench models can use a "Group" as a reference point for all animations, you do not need an item to add functionality, however said groups are ONLY used as a reference point. If blockbench animations are natively used (in its newest form) You do not REQUIRE blender for functionality fully.
This does interrupt old developers' workflows slightly, however adding a parser to locate Blockbench "GROUP" types as a reference instead of a cube for a reference will solve ALL upstream incompatibility in Bettercombat, Figura, Customizable Player Models, (Epic fight sorta) and other mods that depend on PlayerAnimator.

I have, and will provide a reference model for utilizing for reproduction on all figura instances, as this is a version wide incompatibility that can be fixed by referencing the GROUP names.

Broken example: Uses a group to apply the pivot transformations for the Held Items.
example avatar reference.zip

@OracleHisty OracleHisty added the bug Something isn't working label Jan 17, 2025
@OracleHisty OracleHisty changed the title [API] [API] Incompatibility with all forms of Figura, Isolated source issue already, just don't know how directly to implement to your upstream Jan 17, 2025
@ZigyTheBird
Copy link
Contributor

I am interested in increasing compatibility with Figura but to be honest I am having a hard time reading this
Took me a while to figure out what the issue is, and I still don't understand your proposed solution
If you are talking about item pivots specifically then I will let you know that I have been informed of this issue and plan to solve it... ONE DAY... EVENTUALLY.
Your example avatar will come in handy, I would also appreciate a video of the bug.
Thanks for your report :)

@klepticat
Copy link

I've been needing Figura and BetterCombat/playerAnim to work together properly for a private server, so I figured I'd look into this.

I believe I've found the issue, and it might be more of a problem with Figura than with playerAnim, but it's still something that could be fixed on this side of things.

When Figura renders the player's held items at the given pivot points, it cancels the rest of the renderArmWithItem() method, preventing playerAnim from ever updating the transforms of the item later in the same method.

I personally fixed this by moving the code that updates the item transforms from ItemInHandLayer.renderArmWithItem() to ItemInHandRenderer.renderItem() because that seemed to be functionally identical while also allowing Figura compatibility. I feel like there might be a better way to add compatibility that I don't know of, so I haven't made a PR, but I can do so if it sounds like an okay fix.

Here's an example using the basic Figura model with only item pivots added:

Before Fix

2025-02-05_16-10-30_crop0.mp4

After Fix

2025-02-05_16-11-06_crop0.mp4

@ZigyTheBird
Copy link
Contributor

@klepticat make the PR
If it works it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants