The material I gave you is working correctly. It’s just that a lot of meshes don’t look good when you squash them flat, as you get to see both sides / insides.
I’d work on lerping to this view, only when close, and then not going to 100%. You might get somewhere with that, I think.
It’s the skinning that’s throwing things off, because the base mesh is unfortunately rotated (pre-skinned), which was only discovered after it was fully animated (which took a month). Tried to offset the camera, but it’s still at an 45ish angle, plus some pointing upwards.
So after fixing the animation, and replacing the entire lot in engine, can tell that the issue still persists unfortunately… The funny thing about this is that now my assumption is that it’s not working correctly because the transform is world based. That’s why it works in the menu, but in game doesn’t: The in game map is oriented along the Y axis. Which is why it has that 90 degree rotation offset (which looks like less as its skewed on top of the camera’s angle) when viewed in game. So it works as long as the mesh is facing global X as far as I could tell (the camera position matters not). Either way it’s a nightmare.
Would, if the UI wouldn’t be 3D with interactive widgets. Not a fan of widgets, and thought to do something different (hence going the semi-dietetic route). A design decision made with good intent, but lacked the foresight for this use-case (it’s an interactive fiction game, where having a close-up would be nice for the characters; to have variety in camera positions).
Also looked into somehow rendering everything on top (the UI that is), but because there are already a few PP materials going on (some uses drawing on top, like for outlines), sorting them out needs way more than what I know (probably a few days of work from a technical artist, to sort things out and unify the mess); as my attempts just rendered ghost outlines/etc. Way over my pay-grade.
Will just choose other cam positions for now. Will take the blame!
Holy-moly! This might just do the trick. Yeah, the pivot breaks the animation, if it’s not exactly stationary (with the pivot). Luckily when the character is in “dialogue mode” it’s standing exactly on its own pivot (plus this is the only character that’s going offset to its relative and parent’s center). Have yet to implement the other NPCs, but those will move with root motion enabled, so in theory the pivot shouldn’t be an issue in the future. Switching the material right before a camera transition shouldn’t be too much of an issue either (was planning on doing that anyway).
Here’s a screen grab without and with in the editor. The shading is bit scuffed in flat 2D (the model is low poly, w/o normal maps), but is serviceable regardless.
On a similar note, was messing around with the “Skin vertex offset” node (has skinned and pre-skinned outputs) yesterday, but didn’t get anywhere because probably it has the same issue as the “object position”; namely that two are too far away from each other (because of not using root motion here, and it was animated in a specific way). Was also thinking of supplying bone position to the shader from BP, so that the projection updates real-time. Might do that if needed.