Re: simuv2 bug update
Christos Dimitrakakis <[email protected]>
| Newsgroups | gmane.games.torcs.general |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 |> | The code i have presented is not a real fix, but a work-around for the | problems i was having with the new simuv2. I have tested with this | code. Race results seem to be identical and i can't detect any | difference in the way the cars drive when i drive the cars. The only | detectable difference between the original code and my "fixed" code is | that the problem i was having with levitating cars is resolved. As I | stated in an earlier post, i would like to have a real solution to | this problem that doesn't degrade the accuracy of the simulation. I think that just the spring.packers fix should help a bit already. | I think it would be useful to reproduce the original problem. Try | throwing together a car with the xml file i provided in my first post. | (I can send you the entire car if you want.) Now start a race with the | car and hit pause right away. You should see the car positioned slightly | above the track. Look at the of value of new_susp_x in the debugger. I'm | betting you will see that the value is way off. Now turn | pause off and wait for the race state to change to race. You should see | the car drop down on the track. Look at the value of new_susp_x. Now the | value should be correct. OK, thanks for doing this. I think I know what the problem is now. We just have to have a good initial value for wheel->susp.x. Setting it to ~ wheel->susp.x = wheel->pos.z - Zroad; initially will probably work. However, setting it to this value constantly has a side-effect: it makes the wheel instantaneously move to touch the road. In reality a wheel would sometimes not touch the road in bumps. I think a good solution would be to use the Zroad hack only in the RM_RACE_PRESTART phase of the simulation, which is the phase where all the cars are placed on the track. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKR2BFyBv6kELa61sRAiH1AJ9BXSR3h/Brh8wsQbZV3tUCBJXY7gCfV0mH 3faNQdZen8saSZgoSEV+VWE= =wr5S -----END PGP SIGNATURE----- ------------------------------------------------------------------------------