Talk:Func water analog
I'm curious - why exactly does it have to be used with the nature/water_movingplane material? I know Valve used it that way, and I certainly use it that way, but not the rationale for it. Performance reasons? Does it simply look better? Would it crash the game, otherwise? --Campaignjunkie (talk) 15:57, 16 Oct 2005 (PDT)
- I just checked the source files for it...it seems there is no real reason under it—ts2do (talk) 16:40, 16 Oct 2005 (PDT)
- That comes from here. I assumed that wisemx knew what he was talking about. I'll ask whether he knows what it's about. —Maven (talk) 18:30, 16 Oct 2005 (PDT)
Still don't see why....it is a normal water material—ts2do (talk) 18:52, 16 Oct 2005 (PDT)
- You're very probably right. (That forum link was only pointing out the original source, by the way.) In the future I'll try to be more careful about this sort of thing. —Maven (talk) 19:01, 16 Oct 2005 (PDT)
Update, there are two materials that can be used with func_water_analog.
nature/water_movingplane and nature/water_dx70 will both function properly.
Here's a sample project I created with moving waters and 17 SDK materials [2]
These are the only two materials that will allow the Player to look back out of the water, and they are the only two that will work for dx7 systems.
The sample file contains the vmf and bsp. --wisemx 07:35, 17 Oct 2005 (PDT)
So the next question is: what makes those two materials special? —Maven (talk) 17:56, 17 Oct 2005 (PDT)
This next part gets rather technical.
If you examine func_movelinear.cpp you'll find:
LINK_ENTITY_TO_CLASS( func_water_analog, CFuncMoveLinear );
Indicating func_water_analog is func_movelinear with a few twists.
bool CFuncMoveLinear::ShouldSavePhysics( void )
and
{// don't save physics for func_water_analog, regen
return !FClassnameIs( this, "func_water_analog" );}
bool CFuncMoveLinear::CreateVPhysics( void )
We don't have physics mass, we aren't solid and we don't cast a physical shadow.
{if ( !FClassnameIs( this, "func_water_analog" ) )
{//normal door
if ( !IsSolidFlagSet( FSOLID_NOT_SOLID ) )
{VPhysicsInitShadow( false, false );}}
Take a look at the materials used for NATURE/WATER_MOVINGPLANE:
water_movingplane.vmt -> nature/water_movingplane_dx70 -> nature/water_movingplane_beneath.
Which is why the two I listed allow the Player to see back out from inside the water. --wisemx 18:12, 17 Oct 2005 (PDT)