TGE1.5 Water (again bugs)
by Fyodor -bank- Osokin · in Torque Game Engine · 11/06/2006 (5:45 pm) · 1 replies
After playing some time with engine I've found some bugs with water.
So, the first one:
in fluidSupport.cc in function void fluid::SetInfo( ... ) the parameter bool tiling is passed but not actualy set.
So, I've made the beginning of function to look like this:
So, what is the difference? Tiling.
Before: setting the "tile" checkbox in waterblock descriptiong was not giving any difference at all (I can't see it).
After: it still renders the surface, but when you under water not on "central" square no "fog" and no "underwater surface" rendered.
So, we came to the second bug (not fixed). Setting "tile" does not affect to rendering actual "tiles" from one square block. If you are see the "main" square you see all others repeating blocks. Then, if you move your angle so you don't see the "main" waterblock - you don't see any waterblocks.
Screens: (with my fix):



So, the first one:
in fluidSupport.cc in function void fluid::SetInfo( ... ) the parameter bool tiling is passed but not actualy set.
So, I've made the beginning of function to look like this:
{
[b]mTile = tiling;[/b]
m_TerrainSize = terrainSize;
m_TerrainBlockSize = terrainBlockSize;
....Rebuild.So, what is the difference? Tiling.
Before: setting the "tile" checkbox in waterblock descriptiong was not giving any difference at all (I can't see it).
After: it still renders the surface, but when you under water not on "central" square no "fog" and no "underwater surface" rendered.
So, we came to the second bug (not fixed). Setting "tile" does not affect to rendering actual "tiles" from one square block. If you are see the "main" square you see all others repeating blocks. Then, if you move your angle so you don't see the "main" waterblock - you don't see any waterblocks.
Screens: (with my fix):



About the author
Game developer.
Associate Fyodor -bank- Osokin
Dedicated Logic
IF waterblock is set to "TILE=TRUE" then it should render ALWAYS and set it's bounds from "bottom-left" to "upper-right" (to cover whole current zone - be that a 8x sq.size or 2x or 32x terrain sq.size). This will solve half of the problems (if not more). If you have a waterblock.tile=true you can't move it, can't change it's size,etc. And it should be rendered always - be that inside the main "square" or getPosition()=10300,-45000
If you set the "tile-false" - then it should work/render only where it places and where it's bounds are.
sorry for my bad English.