When the viewport is resized or repositioned, the CurrentCamera becomes ineffective. However, I still want to use the CurrentCamera to render the model as though it’s perfectly placed inside the bounding box. The issue is that the model appears offset and is out of view. Does anyone know how to resolve this?
If your viewport frame is that size, then the camera will be skewed. If that’s the case, make the viewport frame the full size of the screen.
Im doing the viewport frame this size and positioned like this for a reason, im going to take the character and cut it down the middle with a viewport frame, awesome ui magic stuff.
A viewport isn’t a direct replica of the workspace. Thus, the CurrentCamera’s position is relative to the viewport only. If the viewport is smaller than the screen, the camera will be offset because the extents are smaller. If you try this at the full size of your screen, it should work.
Otherwise, I have no idea.
Yes i know, im looking for a way to circumvent that issue
There are several obscure functions you can use to compare world space to viewport space and such, but I can’t for the life of me remember what they are.