Hello,
When car crash.
1) Get car position (body element of the car).
2) Destroy the car.
3) Create a new car and move it to the postion (with correction) obtained in 1.
On the other side: to get object position you want:
Body car postion ? front left wheel postion ? rear right wheel position ? All of this are in the same object.
It is not a raydium limitation. Object are container for broad phase collision detection, and that's all.
Hope this help.
here is a function based on your own:
Code:
void RKR_FlipCar(int ID)
{
dReal *pos;
dReal spos[3];
pos = raydium_ode_element_pos_get_name("corps"); //?????
memcpy(spos,pos,sizeof(dReal)*3);
RKR_CreateCarFromDefinition(ID);
raydium_ode_object_move_name_3f (CarDefinitionList[ID].chassis.name, spos[0], spos[1], 2);
}
Press "end" key very briefly to test function (in other case car will fly away, for the reason already exposed).
Nice reflection on the car !
Have a nice day
Ouille.