[Racer-svn] SF.net SVN: racer:[314] trunk/racer/Engine/GameObjects/Car.cpp
Status: Alpha
Brought to you by:
jlegg
From: <jl...@us...> - 2010-06-26 02:23:25
|
Revision: 314 http://racer.svn.sourceforge.net/racer/?rev=314&view=rev Author: jlegg Date: 2010-06-26 02:23:19 +0000 (Sat, 26 Jun 2010) Log Message: ----------- Improve wrong way warning. Modified Paths: -------------- trunk/racer/Engine/GameObjects/Car.cpp Modified: trunk/racer/Engine/GameObjects/Car.cpp =================================================================== --- trunk/racer/Engine/GameObjects/Car.cpp 2010-06-25 19:07:15 UTC (rev 313) +++ trunk/racer/Engine/GameObjects/Car.cpp 2010-06-26 02:23:19 UTC (rev 314) @@ -713,9 +713,11 @@ btVector3 current_coords = get_position(); btScalar current_lap_position = face_u_interpolation(face, current_coords); - // find point 0.25 meters infront of the car's centre. + // find point 15 meters infront of the car's centre. + // The large distance means small bits where the path is backwards + // like the entrance to the longest option in a split is ignored. btTransform transform = rigid_body->getCenterOfMassTransform(); - btVector3 facing_coords = transform(btVector3(0, 0.25, 0)); + btVector3 facing_coords = transform(btVector3(0, 15.0, 0)); Track::NearTrack front(*this); front.move_towards(facing_coords); facing_coords = front.get_position(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |