[ODE] new ODE 0.8 heightfield seems working wrong
bram at sara.nl
Wed Jan 31 12:35:21 MST 2007
This could be bad news.
This is in the history of heightfield.cpp:
r1145 | hidden_asbestos | 2007-01-11 14:54:15 +0100 (Thu, 11 Jan 2007) |
Added changes from patch #1583115 by Tuan Kuranes. Performance in
test_heightfield, especially for meshes is a superb improvement!
It could be that revision 1145 introduced a bug.
It looks like a optimization was added that could change behavior?
You may want to take a look at the patch 1583115 and see if it
can be easily disabled with an ifdef or something.
On Wed, 2007-01-31 at 19:25 +0300, Dmitry Medvedev wrote:
> Hello, everybody.
> Just change ODE from 0.7 to 0.8-rc1.
> I have a scrolling screen in XoY plane with a moving truck and use dHeightfield to represent a landscape.
> Truck's wheels are falling under the heightfiled now... but I didn't change anything in my code.
> In a new heightfield source code all changes are only in private functions and data, all interface functions like dGeomHeightfieldDataBuildSingle() have the same code like in 0.7. So what could happened?
> (If to build ODE 0.8 and copy to its sources heightfield.cpp, heightfield.h from 0.7 aeverything works)
> Here is a part of a creating heightfield code:
> mHeightMapDataID = dGeomHeightfieldDataCreate();
> // configure a heightfield
> mHeightMapSampleData, 0, // based on this instance of data, no duplication
> worldCorner2-worldCorner1, // total x dimension
> worldCorner2-worldCorner1, // total z dimensions
> mHeightMapSampleCount, 2, // cell count on x,z
> REAL( 1.0 ), REAL( 0.0 ), // scale, offset
> REAL( 0.1 ), 0); // // thickness, wrap
> // set finite AABB
> dGeomHeightfieldDataSetBounds( mHeightMapDataID, worldCorner1, worldCorner2 );
> // the height field is movable, y is the height, we position it around z=0 axis
> mHeightFieldGeom = dCreateHeightfield( mGroundSpace, mHeightMapDataID, 1);
> My system has Y axis increasing from top to bottom, so rotate heightfield geometry 180 degrees about Z axis:
> dMatrix3 R;
> dRSetIdentity( R );
> dRFromAxisAndAngle( R, 0, 0, 1, DEGTORAD * 180 );
> dGeomSetRotation( mHeightFieldGeom, R );
> Place geometry in the center of world's X axis and at the bottom of it.
> dVector3 posHeightMap;
> posHeightMap= (worldCorner1+worldCorner2)/2.0f;
> posHeightMap= worldCorner2; // bottom of world
> posHeightMap= 0.0f;
> dGeomSetPosition( mHeightFieldGeom, posHeightMap, posHeightMap, posHeightMap );
> So why mu truck begun to fall in a heightfield?
> ODE mailing list
> ODE at ode.org
More information about the ODE