Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
elchtest mod :)
02-25-2010, 06:43 PM,
#30
 
Well I was by the time able to incorporate the vdrift car into the bullet world. I had to do some scruffy stuff (like inherit from btDiscreteDynamicsworld), because the normal bullet callback and action interface didn't give enough access.

this is how i "solved" it:
- i inherited my own carphysics class from btrigidbody.
- i overwrote predictunconstrainedmotion. if the rigid body is a car, it will be set forward in vdrift. i only use the rigid body velocities produced by vdrift and throw away the position/orientation. the internal car state (engine, suspension, ...) are updated though.
- bullet integrates those velocities, does collision checks, and updates the positions and velocities of the rigid body.
- i push back those rigid body velocities and state into vdrift to keep it in sync.
- when applying the set forward routine in my car physics class i update vdrift several times (as it needs a high update rate, although i didn't understand why exactly).
- car contacts are calculated in every vdrift tick by a ray routine (similar to the bullet vehicle) on the bullet world. (i still want to replace that). I already modeled the wheels as rigid body. but they are still part of the internal model.

so what is possible with that?
you can drive on very hilly terrain, insert bullet objects (the number almost doesn't matter for the performance) , kick them around and get feedback on the car. new cars can be added by inserting my class into the bullet world. jumping is not very realistic because of the way wheel collisions are calculated.

tire position is still a mess. after some time, the getwheelorientation/position functions give me very strange results (sometimes leaving a wheel behind or the orientation is totally wrong).

but i am not sure, if this is of use for you. despite of the nicer interface bullet offers, i can't see a lot of advantages for you.

perhaps you can give me some advice for the cylindershape wheel contact calculation. as i will do for our simulation anyway, i can help adding it to vdrift, too. should i use the SetWheelContactProperties function then, too?
Reply


Messages In This Thread
elchtest mod :) - by NaN - 02-04-2010, 12:04 PM
[No subject] - by NaN - 02-04-2010, 01:01 PM
[No subject] - by NaN - 02-04-2010, 02:16 PM
[No subject] - by nomoo - 02-04-2010, 02:41 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-05-2010, 11:29 AM
[No subject] - by NaN - 02-05-2010, 11:39 AM
[No subject] - by NaN - 02-05-2010, 01:10 PM
[No subject] - by NaN - 02-05-2010, 04:15 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-06-2010, 12:25 AM
[No subject] - by NaN - 02-10-2010, 08:37 AM
[No subject] - by NaN - 02-10-2010, 11:25 AM
[No subject] - by portets - 02-10-2010, 06:58 PM
[No subject] - by NaN - 02-10-2010, 07:36 PM
[No subject] - by portets - 02-10-2010, 08:19 PM
[No subject] - by NaN - 02-20-2010, 05:47 PM
[No subject] - by CrystalH - 02-21-2010, 12:52 PM
[No subject] - by NaN - 02-21-2010, 01:45 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-22-2010, 02:01 AM
[No subject] - by sebiastisch - 02-22-2010, 10:45 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-22-2010, 11:22 AM
[No subject] - by sebiastisch - 02-22-2010, 12:02 PM
[No subject] - by NaN - 02-22-2010, 12:56 PM
[No subject] - by sebiastisch - 02-22-2010, 01:00 PM
[No subject] - by NaN - 02-22-2010, 01:09 PM
[No subject] - by sebiastisch - 02-22-2010, 01:14 PM
[No subject] - by NaN - 02-23-2010, 03:38 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-23-2010, 11:20 AM
[No subject] - by NaN - 02-25-2010, 03:47 PM
[No subject] - by NaN - 02-25-2010, 04:50 PM
[No subject] - by sebiastisch - 02-25-2010, 06:43 PM
[No subject] - by NaN - 02-27-2010, 03:24 PM
[No subject] - by sebiastisch - 02-28-2010, 08:24 AM
[No subject] - by joevenzon_phpbb2_import3 - 02-28-2010, 01:46 PM
[No subject] - by joevenzon_phpbb2_import3 - 02-28-2010, 01:56 PM
[No subject] - by NaN - 02-28-2010, 02:04 PM
[No subject] - by NaN - 02-28-2010, 05:57 PM
[No subject] - by sebiastisch - 02-28-2010, 07:20 PM
[No subject] - by sebiastisch - 03-03-2010, 10:10 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-03-2010, 11:39 AM
[No subject] - by sebiastisch - 03-03-2010, 12:43 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-03-2010, 11:29 PM
[No subject] - by sebiastisch - 03-04-2010, 05:08 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-04-2010, 11:42 AM
[No subject] - by sebiastisch - 03-04-2010, 12:43 PM
[No subject] - by NaN - 03-05-2010, 09:17 AM
[No subject] - by NaN - 03-05-2010, 01:44 PM
[No subject] - by sebiastisch - 03-05-2010, 02:25 PM
[No subject] - by sebiastisch - 03-06-2010, 09:19 AM
[No subject] - by NaN - 03-08-2010, 11:28 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-08-2010, 11:11 PM
[No subject] - by joevenzon_phpbb2_import3 - 03-08-2010, 11:24 PM
[No subject] - by sebiastisch - 03-09-2010, 06:55 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-11-2010, 02:00 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-11-2010, 02:05 AM
[No subject] - by sebiastisch - 03-11-2010, 09:43 AM
[No subject] - by sebiastisch - 03-11-2010, 09:45 AM
[No subject] - by NaN - 03-11-2010, 03:04 PM
[No subject] - by sebiastisch - 03-15-2010, 06:50 AM
[No subject] - by NaN - 03-15-2010, 03:26 PM
[No subject] - by sebiastisch - 03-16-2010, 08:13 AM
[No subject] - by NaN - 03-16-2010, 12:50 PM
[No subject] - by sebiastisch - 03-16-2010, 01:15 PM
[No subject] - by NaN - 03-16-2010, 01:30 PM
[No subject] - by sebiastisch - 03-20-2010, 07:38 AM
[No subject] - by joevenzon_phpbb2_import3 - 03-20-2010, 12:10 PM
[No subject] - by NaN - 03-22-2010, 12:19 PM
[No subject] - by sebiastisch - 03-30-2010, 10:37 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)