I don’t have much experience with 3D rendering and the mathematics behind that and didn’t write the original camera view logic, so much of the code is a black box for me.
I need the distance from the camera view center (I guess that would be the target of the FreeCamera that i’m using) to the left, right, top and bottom edge of the near frustum plane as you can see in this graphic here, otherwise the existing logic doesn’t seem to work.
Do you have any idea how i could get those values? They need to be just a normal number for left, right, top and bottom.
I’ve already managed to get the near frustum plane by
scene.frustumPlanes but i don’t know how i could calculate the distances from the center.
Best wishes and thanks already for reading
Edit: So in the end, I need the size of this “camera-rectangle” in the near frustum plane. I guess then i can simply divide the height/ length of it by 2 and should get the desired values.