Water, water everywhere... but its not supposed to be!
by Brian Colin · in Torque Game Engine · 04/22/2004 (11:09 am) · 25 replies
We're working on a project that requires us to have several Pools of Water at varying heights.(I.e., such as a player might encounter as he/she travels down a mountainside.)
We're having trouble "containing" the water effect, however. When I go to all other areas of the map that are lower than my highest pool, the water effect kicks in, (slow movement- floating, etc.) ..even though these other areas are well outside of the dimensions of the water texture area. In fact, it doesn't seem to matter what I set the water dimensions to, the white grid that indicates the water's height seems to never change and the "area of effect" never lessens. (The Water Block size changes, but the area of effect still affects all lower altitude areas.)
Not sure if this is a "BUG" or just a oddity of the current engine that we need to work around....
So a few questions spring to mind....
Is there a way to Contain the "water effect" to the size of the block indicated in the TRANSFORM fields...?
Or will water always "fill" the lowest areas of a map?
....&/or....
Does the engine support multiple pools (Blocks) of water?
(Others seem to have this problem as well, see the thread in the terrain forum...)
Thanks
We're having trouble "containing" the water effect, however. When I go to all other areas of the map that are lower than my highest pool, the water effect kicks in, (slow movement- floating, etc.) ..even though these other areas are well outside of the dimensions of the water texture area. In fact, it doesn't seem to matter what I set the water dimensions to, the white grid that indicates the water's height seems to never change and the "area of effect" never lessens. (The Water Block size changes, but the area of effect still affects all lower altitude areas.)
Not sure if this is a "BUG" or just a oddity of the current engine that we need to work around....
So a few questions spring to mind....
Is there a way to Contain the "water effect" to the size of the block indicated in the TRANSFORM fields...?
Or will water always "fill" the lowest areas of a map?
....&/or....
Does the engine support multiple pools (Blocks) of water?
(Others seem to have this problem as well, see the thread in the terrain forum...)
Thanks
#22
where do I have to put this code ?
07/04/2004 (2:47 am)
@Anthony Rosenbaum//Water Movement maxUnderwaterForwardSpeed = 16; // 80% of runforce maxUnderwaterBackwardSpeed = 15; // 90% of max water forward speed maxUnderwaterSideSpeed = 15; // 90% of max water forward speed
where do I have to put this code ?
#23
-ner
07/05/2004 (9:41 pm)
You could adjust it in the constructor of PlayerData (C++ code) or in the player.cs file (script). I'd strongly recommend the script since that's what it's exposed for (easy tweaking).-ner
#24
Instead of commenting the action of "remove wet edge", have you tried to check the box "Remove wet edge" from the properties of your water (Misc). It's a cleaner than removing functionnality of the engine. If you don't like clicking, change the default comportement of the waterblock :
Line 62, waterBlock.cc :
All your waterblocks will be fine now ^_^
08/04/2004 (2:36 am)
... hum ...Instead of commenting the action of "remove wet edge", have you tried to check the box "Remove wet edge" from the properties of your water (Misc). It's a cleaner than removing functionnality of the engine. If you don't like clicking, change the default comportement of the waterblock :
Line 62, waterBlock.cc :
mRemoveWetEdges = true;
All your waterblocks will be fine now ^_^
#25
These are the issues I have:-
1) I couldnt get that drowning code to work
2) When a character is running on land that is the same height as the waterblock, you hear the water sounds as if he's splashing about.
08/04/2004 (9:34 pm)
I can get the waterblock to work for the most part ... These are the issues I have:-
1) I couldnt get that drowning code to work
2) When a character is running on land that is the same height as the waterblock, you hear the water sounds as if he's splashing about.
Torque Owner Brian Colin
Your INFO and and INSIGHTS are very much appreciated.
We're been working on other aspects of the game for the past couple of weeks, but we'll be revisiting our water block issues again this coming Monday, so I'll be sure and let you know how things go.
Thanks again.
______
OK! Now its Tuesday and we were able to successfully address the insidious Multiple Water Block Problem!
Based on the info from Gerald and Xavier above, we took the approach of simply commenting out a couple lines of code...
in terrain/waterblock.cc:
bool WaterBlock::onAdd()
{
...
if(!mRemoveWetEdges)
{
// mObjBox.min.set(-1e4, -1e4, 0);
// mObjBox.max.set( 1e4, 1e4, 1);
}
...
if these commands are removed (they are setting the min values to (-10000, -10000, 0) and max values to (10000, 10000, 0)), we do not seem to have the problem anymore.