Hello monkeys,
I created a simple scene with a terrain. After that I added a WaterFilter to the scene. That’s my scene so far!
As long as I don’t change the camera frustum perspective it does look totally normal. But for my game I need to change it, so I wrote the following line:
cam.setFrustumPerspective(45f, (float) settings.getWidth() / settings.getHeight(), 0.001f, 500);
With this line of code the whole water is doing some weird stuff. Have a look at the following video:
Why does this happen and is there a solution for this problem / bug? As I said, without the line above it does work perfectly!
EDIT:
I FOUND A SOLUTION:
It seems that the third value (0.001f) is a little bit too small. When I replace it with 0.01f it works fine.
The line looks like this now:
cam.setFrustumPerspective(45f, (float) settings.getWidth() / settings.getHeight(), 0.01f, 500);