Hi Alan

TORCS is modular, because it should be possible to switch modules, there should no module internals used, this is an architecture decision (loose coupling, dependency inversion, client (->TORCS) dictates the interface). Another point is that a real driver doesn't now the hidden data either, he feels just the final force acting on him.

But the solution for your requirement is trivial, just add to the tCarElt struct the fields you need, and fill it in during the update (I do not have the code handy to look it up, but at some point some data from the simu tCar struct is copied to tCarElt to "publish" it to TORCS).

Have a look as well into the TORCS FAQ, chapter 6. Let me know if this helped you.

Best regards


On Oct 24, 2012, at 18:25 , Alan Ali wrote:


I am new user (i have acceptable progaming experince but not  games programing).

 i am trying to examine some control laws in PHD using TORCS as simulator, so now i am working in the "drive" function in the "bt" projects to drive the car but  i have some problem in finding the forces applied on the cars, accutally it seems that the froces are computed in the "simv2" projects(aero dynamic forces and the rolling forces...) but the question is how to access it from "bt" project ?

accutaly i don't understand why the simuv2 is not used in any projects, i can't see any call to the functions of simuv2 outside simuv2 (no project depend on it other than TORCS), if you can give me a link or reference that explaine how the game work and when the physique engine is envolved and whether we can access it's variables or not.

thanks a lot