Meshes are culled too early at the top edge of the screen

Hey everyone,
I tried for hours to find out, why my meshes are being culled too early. Now I took heart and registered here, in hope to get some help and maybe grow into the communiy.

So when i pan down with my camera (in the direction, where the Z coordinate increases), the top rows of the tiles gets culled halfway before it leaves the screen (on the top edge of the screen). Here is a Screenshot:

I tried several changes to my camera settings, but they didnt really help, also tile.setModelBound(new BoundingBox()) and tile.updateModelBound();
didnt help.

My Camera Settings are:


            Vector3f campos= new Vector3f(0, 9, 10);
            Quaternion camrot= new Quaternion (0, 1, -0.5f, 0);

I would appreciate your help! :slight_smile:

This is certainly not a valid quaternion. It’s not ok to just stick random values in a quaternion and the values are generally not human-understandable.

Try making a valid quaternion (using fromAngles() or so) and see if that fixes it. It might not, though.

Generally this sort of problem is bounding box related. If you still have the problem, try making a single class test case that illustrates the issue using the standard JME meshes. When that works just fine then you can figure out what is different in your own code that causes the problem.

I tried to kinda reconstruct the Quaternion from print-outputs while in flycam :smiley: But you got that all right, replacing the quaternion by fromAngles() solved the culling issue. Thanks for pointing out! :slight_smile:

You know, I wonder if this was my problem, with my towers game? I’m sure you’ll remember that I created a thread almost exactly the same as this one about a week ago.

Goes off to do experiments

Yeah, I was going to go back and find the thread.

For some reason, folks plugging random values into their magic quaternions never occurs to me. :slight_smile: