REAL water level
by Olivier Arguimbau · in Torque Game Engine · 01/08/2002 (6:51 am) · 0 replies
Hi.
Is there a way to get the REAL water level (with waveamplitude > 0) at a given point (X, Y).
I look at the function waterblock::castray and at IsFluidAtXY and they only test if the ray is crossing the default water level not the current one....i mean with waves :)
Any idea ?
....
I look again in the source, i found a possibility using a code like in fluidquadtree.cc:
// Determine where fluid surface is directly above (or above) the eye.
sSurfaceAtEye = m_SurfaceZ + (SINE( (m_Eye.X * 0.05f) + m_Seconds ) +
SINE( (m_Eye.Y * 0.05f) + m_Seconds )) * m_WaveFactor;
Am i correct ? I know it's strange but i'm at work and i can't test it....
Is there a way to get the REAL water level (with waveamplitude > 0) at a given point (X, Y).
I look at the function waterblock::castray and at IsFluidAtXY and they only test if the ray is crossing the default water level not the current one....i mean with waves :)
Any idea ?
....
I look again in the source, i found a possibility using a code like in fluidquadtree.cc:
// Determine where fluid surface is directly above (or above) the eye.
sSurfaceAtEye = m_SurfaceZ + (SINE( (m_Eye.X * 0.05f) + m_Seconds ) +
SINE( (m_Eye.Y * 0.05f) + m_Seconds )) * m_WaveFactor;
Am i correct ? I know it's strange but i'm at work and i can't test it....
About the author