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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.