wheel contact

Information about the inner-side magic

Moderator: kilo

wheel contact

Postby zobig78 » Mon Oct 01, 2012 10:57 pm

Hi all!
i'm looking the code and I have a question about the wheel contact..
how is managed?

here: (wheel.cpp)
Code: Select all
wheel->zRoad = Zroad = RtTrackHeightL(&(wheel->trkPos));

you calcolate the distance from the road (always vertically, not by the normal of the car, is right?)

and here: (wheel.cpp)
Code: Select all
RtTrackSurfaceNormalL(&(wheel->trkPos), &normal);

you calculate the normal, always? also if for example the car is jumping and is 1, 2 meters over the road?

and here: (car.cpp)
Code: Select all
RtTrackSurfaceNormalL(&(car->trkPos), &car_normal);
car->normal = car_normal; // Use precalculated values
// Get normal N_q in local coordinate system
QuatInverseRotate(car_normal, car->posQuat, rel_car_normal);
// Increment the upside down timer.  This can be used later to
// remove cars that have been upside down for too long.
if (rel_car_normal.z > 0) {

the normal of the car is calculated from the cog point and doesn't depend by the distance of the car to the road, and usually (if is on the road or also over the road, like jumps) the car_normal.z is > 0.. right

thanks in advance and congrats for the code.. is very interesting!

:)
zobig78
 
Posts: 4
Joined: Thu Aug 09, 2012 11:19 am

Return to SD Physics & Internals

Who is online

Users browsing this forum: No registered users and 1 guest

cron