Water boundaries

Hello,

I’ve looked in al lot of places for this answer, but never found it.

Is it possible to use a geometry, spatial or something (from orgexml) in the waterfilter as the water itself? I have a very odd shaped pool in my 3d world and right beside and under the pool you can walk, but now i walk under water, and that is not what i want. Is it possible to do this now?

Are you talking about having a spatial with a water surface? That would fit in your odd shaped pool.
If so, SimpleWater is what you are looking for.

1 Like

What benkibitzer said.

But you also have a way to limit the area covered by the waterFilter. It’s just basic though, you can set a center and a radius, giving you a circle shaped pool. You can set the shape to square and the radius will be considered as an extent.

Look at https://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/water/TestMultiPostWater.java

and the 6 last methods of the water filter
https://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core-effects/com/jme3/water/WaterFilter.java#1082

1 Like

I’m sorry for my very late reaction, The solution you have told me worked very good, thank you!

2 Likes