Canvas Layer is non positional so you dont need to set is as the root node plus you dont need a secondary viewport for what youre doing here. In 3D you can use the canvas_layer as your base node for your UI scenes.
Ah, thank you, I see 👍. For anyone reading, TLDR would be that there's always a "root" viewport, so only the camera & environment are truly necessary, the subviewportcontainer, etc... was gratuitous for minimal setup 😅. Appreciate it, I'll pin this in case more comments end up in here later.
Thanks a lot for this video, if I am not mistaken, the subviewport is useful for post-processing, shaders and other opengl stuff, it has more features then the root viewport, it is maybe a good idea to implement one since the beginning avoiding headaches in the future. It is interesting how people try find problems instead of being grateful for your work. Cheers mate!
Thanks! I did legit learn about the default viewport after posting this video, but indeed, this will have applications beyond just the default "template" I was aiming for.
Yep, Chevifier pointed out what basically amounts to that and I pinned his comment ^^^. Personally, I still like to set it up this way from a strictly organizational standpoint, but you're right that it is not necessary. The sub viewport is also not needed, but you can play with it and do some other stuff if you like, say, having a UI in a region of the screen, etc... I haven't tried the control node without a canvas layer at all, but you might want the canvas layer there, at least, even if it's not positional. If you end up making a more complicated UI, you might want to put stuff on top of each other, and need to specify the rendering order/layer.
That was not actually necessary. The comment I pinned from Chevifier mentions that as well, there isn't actually a need for an additional viewport container. As to the why, just my mistake is all. I suppose the way I did it might be a start at doing a split-screen or the like with UI elements, though I haven't tried that out yet.
I don't understand how this is so convoluted, it should really just be a text3d node and you put that on. Surely the developers look at this workaround and go "yeah, that's not ideal"
Not sure without more information. So, I tried setting up the very basics (without the subviewport which, as folks helped out with in comments, was unnecessary). I have the canvas w/ a texturebar in the corner as an example, and then I tried this as a very quick script to test moving the camera: public override void _PhysicsProcess(double delta) { Vector2 direction = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down"); var Camera = GetViewport().GetCamera3D(); Camera.RotateX(direction.Y/45f); Camera.Translate(new Vector3(direction.X, direction.Y, 0f)); } And that worked to use the arrow keys to mess with the position, and it did not change my texturebar position, but I'm not sure what you mean by "affecting camera movement" either. It might depend on node setup, something moving with a child under it that's moving as well, etc...
Does every video have to include chewing sounds? I didn't know this was an ASMR video. LOL. Can't pay attention to the words. Anyone else? No, just me? Cool.
People arent typically aware of how their mouth sounds from extremely close up. I had that problem when i first got a mic that i used close to my mouth. You have to retrain how you speak.
Canvas Layer is non positional so you dont need to set is as the root node plus you dont need a secondary viewport for what youre doing here.
In 3D you can use the canvas_layer as your base node for your UI scenes.
Ah, thank you, I see 👍. For anyone reading, TLDR would be that there's always a "root" viewport, so only the camera & environment are truly necessary, the subviewportcontainer, etc... was gratuitous for minimal setup 😅. Appreciate it, I'll pin this in case more comments end up in here later.
Project Settings > General > Display > Window > Size > Mode: Maximized
You're not the hero we wanted.
But the hero we needed.
Haha, thanks very much! That's a high bar 🍻
Thanks a lot for this video, if I am not mistaken, the subviewport is useful for post-processing, shaders and other opengl stuff, it has more features then the root viewport, it is maybe a good idea to implement one since the beginning avoiding headaches in the future.
It is interesting how people try find problems instead of being grateful for your work.
Cheers mate!
Thanks! I did legit learn about the default viewport after posting this video, but indeed, this will have applications beyond just the default "template" I was aiming for.
So I just tried putting UI nodes under a Control node...and it just worked? What's the benefit of doing it this way instead?
Yep, Chevifier pointed out what basically amounts to that and I pinned his comment ^^^. Personally, I still like to set it up this way from a strictly organizational standpoint, but you're right that it is not necessary. The sub viewport is also not needed, but you can play with it and do some other stuff if you like, say, having a UI in a region of the screen, etc... I haven't tried the control node without a canvas layer at all, but you might want the canvas layer there, at least, even if it's not positional. If you end up making a more complicated UI, you might want to put stuff on top of each other, and need to specify the rendering order/layer.
Why did you originally add a subviewportcontainer?
That was not actually necessary. The comment I pinned from Chevifier mentions that as well, there isn't actually a need for an additional viewport container. As to the why, just my mistake is all. I suppose the way I did it might be a start at doing a split-screen or the like with UI elements, though I haven't tried that out yet.
I don't understand how this is so convoluted, it should really just be a text3d node and you put that on. Surely the developers look at this workaround and go "yeah, that's not ideal"
I am trying to add in a health bar and for some reason it is affecting my camera movement. Do you have any idea why this is
Not sure without more information. So, I tried setting up the very basics (without the subviewport which, as folks helped out with in comments, was unnecessary).
I have the canvas w/ a texturebar in the corner as an example, and then I tried this as a very quick script to test moving the camera:
public override void _PhysicsProcess(double delta)
{
Vector2 direction = Input.GetVector("ui_left", "ui_right", "ui_up", "ui_down");
var Camera = GetViewport().GetCamera3D();
Camera.RotateX(direction.Y/45f);
Camera.Translate(new Vector3(direction.X, direction.Y, 0f));
}
And that worked to use the arrow keys to mess with the position, and it did not change my texturebar position, but I'm not sure what you mean by "affecting camera movement" either. It might depend on node setup, something moving with a child under it that's moving as well, etc...
@@Holonet01 thank you
Future here! they fixed! it
Thank you :)
You're welcome 👍
this is so hard bro😂😂😂😂
Does every video have to include chewing sounds? I didn't know this was an ASMR video. LOL. Can't pay attention to the words. Anyone else? No, just me? Cool.
People arent typically aware of how their mouth sounds from extremely close up. I had that problem when i first got a mic that i used close to my mouth. You have to retrain how you speak.
just you