Selecting Tris with in a Cube
Blitz3D Forums/Blitz3D Programming/Selecting Tris with in a Cube
| ||
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. |
| ||
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! |
| ||
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. |
| ||
hey great ideas guys... a lot easier then what I was concidering. I'll try it and give you an update. Thanks! |
| ||
I used both methods to great effect, but now how best to detect the camera is IN the water cube? |
| ||
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. |
| ||
google for point -> cube colission tutorials. |