From 16236d4b825cd6a41aa0cff3cd4a734eb286a428 Mon Sep 17 00:00:00 2001 From: t3du <32546729+t3du@users.noreply.github.com> Date: Sun, 8 Dec 2024 10:13:43 -0300 Subject: [PATCH] Add files via upload --- armory/Sources/armory/logicnode/DrawCameraNode.hx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/armory/Sources/armory/logicnode/DrawCameraNode.hx b/armory/Sources/armory/logicnode/DrawCameraNode.hx index 628f14fdd8..73b6961f3f 100644 --- a/armory/Sources/armory/logicnode/DrawCameraNode.hx +++ b/armory/Sources/armory/logicnode/DrawCameraNode.hx @@ -92,13 +92,22 @@ class DrawCameraNode extends LogicNode { for(i in 0...cameras.length) { final rt = renderTargets[i]; + positions[i].set( + inputs[numStaticInputs + i * 5 + 1].get(), + inputs[numStaticInputs + i * 5 + 2].get() + ); + final posX = positions[i].x; final posY = positions[i].y; g.color = 0xff000000; g.fillRect(posX, posY, rt.width, rt.height); g.color = 0xffffffff; - g.drawScaledImage(rt, posX, posY, rt.width, rt.height); + + if (kha.Image.renderTargetsInvertedY()) + g.drawScaledImage(rt, posX, posY+rt.height, rt.width, -rt.height); + else + g.drawScaledImage(rt, posX, posY, rt.width, rt.height); } } }