GUI Nodes Cut off(SOLVED)

Hello,

Issue
I have a GUI Only scene where some nodes are being cut off during runtime. Visually, only part (or none) of the node is showing, almost like there is something else being drawn over it.

It seems to be location related - if I change the location of the cut off node to another part of the screen (programmatically during the init function), the affected node appears, and if I move other non-affected nodes to the affected area, they also disappear/are cut off, so its not the specific nodes themselves that are problematic, but that affected area has something over it that is being drawn.

–
Investigation

However, there is nothing over that area. clicking on each node in my hierarchy view and checking the positions, nothing is there that should be drawn that could cut the texture off.

I also tested like so - whenever clicking I do pickNode on every single node in the gui and print out the node position and rotation that is selected (so I can see every node over the area that was clicked on). When I click on the affected area (with a sprite cut off), and then another sprite that is showing, and compare the two, no extra nodes are drawn over it - they are exactly the same except for differences in the Z value of the sprite.

Z value shouldn’t affect anything because Z values don’t matter for GUI, and because if the Z value was a problem it wouldn’t show at all, not be partially cut off. Also No rotation was found (all nodes had Quat(0,0,0,1)), and its 2D anyway. Default renderer is in use (I think, I didn’t change it)

–
Solutions

Remaking the entire hierarchy fixed the issue once, then it reappeared a little later. I do use layers, and everything but text is on a general layer.

Thank you for considering

image

They do, but not for render order. Something outside of the range of accepted z-values will not be rendered.

Can you share a minimal project?

Here is a project that is just the GUI screen and a test script to print out nodes when clicking.

Thank you for reviewing!

GUIRenderTestMW.zip (63.5 KB)

I took a look at your test project and first thing I tried was to zero all gui nodes z positions, then I tried moving around some nodes.
java_WJmPlJDgs8
I noticed that moving the nodes in the Y axis made the Z values change. First I checked that the scene-view was not skewed(using “.” resets view). Then I went up to the parent nodes until I found one that was rotated. The issue you are having is due to a couple of parent nodes that are rotated in the x axis making some of the nodes rendered outside the near and far plane. To fix your issue you can take a look at “mindpotions” & “bodypotions” nodes and set their rotation x values to 0.

3 Likes

Thank you so much! Zeroing out the rotation and then zeroing out all the Z values made everything appear.

I even printed out the rotation of every node when clicking around to see if there was something wrong…and then promptly did not notice that some of the rotations weren’t zero.

Really appreciate you looking at this.

1 Like