Time for action – take a swim

Beautifully designed 3D landscapes invite the player to explore and interact. You couldn't hold it against a player if he or she tried to take a closer look at your water. Maybe a body of water is an important element in your game. Maybe some parts of the game story are even set underwater. For these cases, we need to pull out all the stops and show off what the engine is capable of, by using the com.jme3.water.WaterFilter class.

  1. Make a copy of WaterSimple.java and name the class WaterTerrainSky.java. Remember to also refactor the first line of the main() method to the following:
    WaterTerrainSky app = new WaterTerrainSky();
  2. Keep the class field for the node that groups the reflected scene.
     private Node reflectedScene; ...

Get jMonkeyEngine 3.0 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.