Selecting Tris with in a Cube

Blitz3D Forums/Blitz3D Programming/Selecting Tris with in a Cube

Moore(Posted 2007) [#1]
Im trying to place water unto my map... I have used a transparent cube with a water bmp texture and placed it on my level map... and that works... I even used another cube, with the same texture, flip so that when you enter the water and look up you see through the water texture.... but all of the ground under the water remains unchanges.... is there a way to select all the tris of the level mesh that are IN the water cube and apply they water texture to them? Thanks for any help you can provide.


stayne(Posted 2007) [#2]
You could also think about maybe using fog when you're underwater. If the camera is below the water level, then set the camera fog mode. Might look good!


Ross C(Posted 2007) [#3]
If it's full screen you could mess about with the gamma commands, or, place a quad/sprite over the camera, and texture it blue, to give the underwater a tint. Hide it when your above water.


Moore(Posted 2007) [#4]
hey great ideas guys... a lot easier then what I was concidering. I'll try it and give you an update. Thanks!


Moore(Posted 2007) [#5]
I used both methods to great effect, but now how best to detect the camera is IN the water cube?


Dreamora(Posted 2007) [#6]
well you would store the position and size of the water block somewhere and if the camera is within it (mathematically) you would be done.


deps(Posted 2007) [#7]
google for point -> cube colission tutorials.