3d canvas fancy vs fabulous rotation inconsistency.
Wojbie opened this issue ยท 1 comments
Minecraft Version
1.19.x
Version
1.102.0 - SC3
Details
Canvas grid items are on seems to be rotating around with player pitch and roll when on Fabulous.
Test program used:
local ni = peripheral.wrap("back")
ni.canvas3d().clear()
local canvas = ni.canvas3d().create()
local el = {}
el[1] = canvas.addBox(0,0,0,1,1,1,0x00ff00ff)
el[2] = canvas.addFrame({3,3,3})
el[3] = canvas.addItem({-3,3,3},"minecraft:redstone",2)
el[4] = canvas.addItem({3,3,-3},"minecraft:crafting_table",2)
--el[5] = canvas.addLine({-3,3,-3},{0,0,0},10,0xff0000ff) --Not implemented
el[2].addRectangle(0, 0, 90, 90, 0x0000ffff)
el[2].addText({100,100}, "debug", 0xffffffff, 4)
local state = true
while true do
for _,e in ipairs(el) do
e.setDepthTested(state)
end
sleep(2)
state = not state
end
Likely offending code:
Though the -cam.pitch
here is suspicious too, that was not negated on 1.12
In 1.12 it is negated for Item3D:
https://github.com/SquidDev-CC/plethora/blob/3c9b41561a3dcc45d08a9167f6e471638cf2e170/src/main/java/org/squiddev/plethora/gameplay/modules/glasses/objects/object3d/Item3D.java#L158
Perhaps trying to make it generic here caused more problems than it solved