mojira.dev
MC-261116

block_display, item_display entities transformation rotation incorrectly applied to block model origin instead of entity local origin

After applying a translation transformation, left_rotation and right_rotation still applies relative to the block model origin instead of the block_display entity origin.

In the two photos below the following transform has been applied:

{left_rotation:{angle:0f,axis:[0.57735f,0.57735f,-0.57735f]},right_rotation:{angle:0f,axis:[0f,0f,1f]},scale:[1f,1f,1f],translation:[-0.5f,-0.5f,-0.5f]}

with left_rotation's angle being updated in-between.

[media]
[media]

Attachments

Comments 6

I think this is intended. Just as what https://minecraft.fandom.com/wiki/Display says, the conversion between the decomposed form and the matrix form is Mx=(TUΣV*)x, where M is the matrix form, x is a point vector, UΣV* are 4x4 matrices corresponding to the result of SVD of the upper-left 3x3 matrix, and T is the 4x4 translation matrix. So the translation is always applied last.

The wiki describes the game as-is; it's not asource for intended design (or not).

@Dhranios , sorry my comment wasn't complete, I'm not saying the wiki documented the intent. What I'm trying to do is adding more information to this issue about how the transformation currently works. I mentioned the wiki only because there is some information about it on the wiki. The reason I say it is intentional is because I don't think there's a better way to decompose the matrix.

According to the 1.19.4 Release Notes, translation is applied first: "Transforms are composed in order translation, left_rotation, scale, right_rotation". https://www.minecraft.net/en-us/article/minecraft-java-edition-1-19-4

Is there a explanation for the intended behaviour? Is it the OpenGL pipeline? Or have I got my Quaternion transformations mixed up? As far as I understand affine transforms are normally applied around the new axis created by translations.

⚠️ Please do not add Affected Versions to resolved reports.

Have a look at the Resolution and the comments to see why this ticket has been resolved. If you think this ticket has been resolved erroneously you can contact the Mojira staff on Discord or Reddit.

-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

Mytanic

(Unassigned)

Confirmed

(Unassigned)

1.19.4

Retrieved