Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Ultimatestunts-graphics] four wheels! cjp?

 Re: [Ultimatestunts-graphics] four wheels! cjp? From: Janek Kozicki - 2003-12-26 22:08:24 ```> ps: cjk, great work you did with car bouncing and rotation ;) ooops. sorry. it should be CJP :/ -- Janek Kozicki | ```

 [Ultimatestunts-graphics] test, hello. From: Janek Kozicki - 2003-12-25 00:36:18 ```hello I subscribed to the list. testing... -- Janek Kozicki | ```
 [Ultimatestunts-graphics] Physics. From: Janek Kozicki - 2003-12-25 00:50:31 ```I've found some links about car physics: http://phors.locost7.info/contents.htm (complete book scanned) http://home.wxs.nl/%7Emonstrous/tutcar.html (has examples in java and C) http://www.oxforddynamics.co.uk/download.htm (some kind of library with sources. claims to simulate car behaviour, I can't test it, because it runs only under windows.) -- Janek Kozicki | ```
 [Ultimatestunts-graphics] four wheels! cjk? From: Janek Kozicki - 2003-12-26 12:58:59 ```I'm experimenting with the code a little bit. And I managed to add up/down directions for the car, effectively changing it from hovercraft into flying saucer ;) After some code analysis I discovered that following things need to be done: -- wheel support the car body +- it means collosion detection for wheels +- then it means force-transfer from wheels to the car body -- car 'bouncing off the ground' problem +- maybe introduce some bool variable 'two-materials-in-contact' ? it will avoid this constant falling down of the car, then colliding with ground, so it jumps up and down. +- maybe changing integrating method from x(t+dt)=x(t)+v*dt into better method would help? There are at least 5 of them. I have one right here: x(t+dt)=2*x(t)-x(t-dt)+a(t)*(dt)^2 (this one uses acceleration, smaller error: of range (dt)^2) If you are interested I'll check formulas for other possibilities. without checking I can tell only their names: Verlet integration, Velocity Verlet, Runge-Knutta, Predictor-Corrector, Leap Frog. Maybe, Velocity Verlet will be the best? (oh, I've found a good link for Velocity Verlet: http://www.orcero.org/irbis/md/node14.html :-)) I see that it involves mass. I think this is very good, and half timesteps, hmmm...) Maybe with better integration method the car will not bounce off the ground? I think I will check it... -- car movement should be caused by rotating wheels. I see this scenario: +- wheels rotate AND wheels collide with some material (the ground). THEN a torque is generated that tries to move wheel center forward. The force that moves wheel center is transferred to car body. (yeah, easy to say... much harder to implement) cjk, I'll be toying with the source for a while. - I'll check if another integration method changes things a little. (I see that I'll have to introduce acceleration...) - And I'll try to add 'wheel support the car body'. I have no idea if I will be succesfull or not. ;-)) depends on how much time I'll have ;) ps: cjk, great work you did with car bouncing and rotation ;) -- Janek Kozicki | ```
 Re: [Ultimatestunts-graphics] four wheels! cjp? From: Janek Kozicki - 2003-12-26 22:08:24 ```> ps: cjk, great work you did with car bouncing and rotation ;) ooops. sorry. it should be CJP :/ -- Janek Kozicki | ```
 [Ultimatestunts-graphics] xxgdb From: Janek Kozicki - 2003-12-26 13:02:04 ```I have some prblems with launching xxgdb on untimatestunts. Everything works fine until the moment the SDL is initialised. SDL cannot be initialised, and ultimatestunts exits. Is this a known problem? any hints how to deal with this? -- Janek Kozicki | ```