Game Development Community

T3D 1.1 Beta 2 - Water plane gone insane - RESOLVED

by Rex Hiebert · in Torque 3D Professional · 08/04/2010 (3:51 pm) · 5 replies

Build: 1.1 Beta 2

Platform: Windows 7 64 bit

Target: Editor, Gameplay

Issues: When driving a vehicle around the deathball desert a water plane tilts with the camera making the water appear to cover/uncover the terrain

Steps to Repeat:
1. Launch detahball
2. Press F11 to enter world editor
3. Add a water plane and set the position to "0 0 234"
4. Add a vehicle
5. Press F11 to get back to the game
6. Enter the vehicle and go for a drive
7. Watch the water plane as you drive around. When the car is not on level ground you will see the plane tilt to cover/uncover the terrain.

#1
08/04/2010 (3:58 pm)
I've found that I have had to re-create the water for each release. Probably not related though, maybe a cosmetic bug here.
#2
08/11/2010 (8:50 pm)
Logged as TQA-792 for the QA team to verify.
#3
08/16/2010 (7:33 pm)
Bug confirmed.
#4
08/19/2010 (6:03 pm)
Fixed for next release.

The fix was in WaterPlane::innerRender in how it sets up the renderMat.

MatrixF renderMat( true );

   camMat.getColumn( 1, &fvec );
   uvec.set( 0, 0, 1 );
   rvec = mCross( fvec, uvec );
   rvec.normalize();   
   fvec = mCross( uvec, rvec );
   pos = camPosition;
   pos.z = objMat.getPosition().z;      

   renderMat.setColumn( 0, rvec );
   renderMat.setColumn( 1, fvec );
   renderMat.setColumn( 2, uvec );
   renderMat.setColumn( 3, pos );

   setRenderTransform( renderMat );
#5
08/31/2010 (10:55 pm)
Fixed in 1.1 Beta 3.