From: <hik...@us...> - 2008-03-04 03:37:48
|
Revision: 1625 http://supertuxkart.svn.sourceforge.net/supertuxkart/?rev=1625&view=rev Author: hikerstk Date: 2008-03-03 19:37:42 -0800 (Mon, 03 Mar 2008) Log Message: ----------- Bugfix: sometimes karts jumping down the ramp in tuxtollway would incorrectly be rescued. This fix avoids the problem (the raycast for terrain detection actually starts under the track) by letting the ray start a certain epsilon higher. Modified Paths: -------------- trunk/supertuxkart/src/kart.cpp Modified: trunk/supertuxkart/src/kart.cpp =================================================================== --- trunk/supertuxkart/src/kart.cpp 2008-03-04 03:26:09 UTC (rev 1624) +++ trunk/supertuxkart/src/kart.cpp 2008-03-04 03:37:42 UTC (rev 1625) @@ -623,7 +623,11 @@ } btTransform trans=getTrans(); - TerrainInfo::update(trans.getOrigin()); + // Add a certain epsilon (0.1) to the height of the kart. This avoids + // problems of the ray being cast from under the track (which happened + // e.g. on tux tollway when jumping down from the ramp). + btVector3 pos_plus_epsilon = trans.getOrigin()+btVector3(0,0,0.1f); + TerrainInfo::update(pos_plus_epsilon); if (getHoT()==Track::NOHIT || (getMaterial()->isReset() && isOnGround()) ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |