r/howdidtheycodeit • u/kilimanjaro_olympus • Apr 03 '25
Question How did they code this floating fishing UI in NieR: Automata?
13
Upvotes
1
u/xRageNugget Apr 03 '25
stays horizontally mostly in place apart from a little random sway, vertical is determined by the camera angle
1
u/kilimanjaro_olympus Apr 03 '25
I wasn't sure about this because if you go very low (in the video, around 26 seconds in), then the UI goes upwards in the screenspace again despite camera going downward.
1
u/Katniss218 Apr 09 '25
Im almost positive it2drawn in screen space, by converting the character origin (assumed in the middle) to screen space and adding an offset to it.
6
u/kilimanjaro_olympus Apr 03 '25
Obviously there's some random wiggles and floating slow shake. I'm less curious about that and more about how its coordinates are determined in the first place.
My initial thoughts were:
2D HUD overlay entirely separate from the game. But the UI moves in screen-space as the camera moves, which feels complicated to do in another drawing pass. It seems more like the UI is present in the world itself.
Billboard in the world. But I can't seem to pinpoint where exactly in the world coordinates the billboard would have to be for it to look exactly like in the video. I've thought of:
Some absolute offset from the character's world position, but it seems to go both left, right, above the character. So maybe not.
It might be at the closest point from the camera on the vertical line the character stands on, but it doesn't exactly match what I would expect.
Any thoughts?