Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualMedo3337

Posted 20 June 2013 - 12:14 AM

I have create a simple vehicle in 3Ds Max and trying to adjust the wheels position in bullet physics.

 

I'm able to grab each wheel position by getting each wheel transformation matrix.

 

Though I'm not getting the wheels position same as the position in 3Ds Max, How can I adjust the wheels position to be exactly as in 3Ds Max model?.

 

The model consist of (chassis mesh, wheel1 mesh, wheel2 mesh, wheel3 mesh, wheel4 mesh), all in a single .x file.

D3DXMATRIX matWorld;
btVector3 connectionPointCS0;
bool isFrontWheel = true;

// WHEEL 1
matWorld = wheel[0]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

// WHEEL 2
matWorld = wheel[1]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

isFrontWheel = false;

// WHEEL 3
matWorld = wheel[2]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

// WHEEL 4
matWorld = wheel[3]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

Screenshot (BTW, In this screenshot, the vehicle didn't hit the ground yet):

[attachment=16392:vehicle1.png]


#3Medo3337

Posted 19 June 2013 - 10:44 PM

I have create a simple vehicle in 3Ds Max and trying to adjust the wheels position in bullet physics.

 

I'm able to grab each wheel position by getting each wheel transformation matrix.

 

Though I'm not getting the wheels position same as the position in 3Ds Max, How can I adjust the wheels position to be exactly as in 3Ds Max model?.

 

The model consist of (chassis mesh, wheel1 mesh, wheel2 mesh, wheel3 mesh, wheel4 mesh), all in a single .x file.

D3DXMATRIX matWorld;
btVector3 connectionPointCS0;
bool isFrontWheel = true;

matWorld = wheel[0]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

matWorld = wheel[1]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

isFrontWheel = false;

matWorld = wheel[2]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

matWorld = wheel[3]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

Screenshot (BTW, In this screenshot, the vehicle didn't hit the ground yet):

[attachment=16392:vehicle1.png]


#2Medo3337

Posted 19 June 2013 - 10:43 PM

I have create a vehicle in 3Ds Max and trying to adjust the wheels position in bullet physics.

 

I'm able to grab each wheel position by getting each wheel transformation matrix.

 

Though I'm not getting the wheels position same as the position in 3Ds Max, How can I adjust the wheels position to be exactly as in 3Ds Max model?.

 

The model consist of (chassis mesh, wheel1 mesh, wheel2 mesh, wheel3 mesh, wheel4 mesh), all in a single .x file.

D3DXMATRIX matWorld;
btVector3 connectionPointCS0;
bool isFrontWheel = true;

matWorld = wheel[0]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

matWorld = wheel[1]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

isFrontWheel = false;

matWorld = wheel[2]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

matWorld = wheel[3]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

Screenshot (BTW, In this screenshot, the vehicle didn't hit the ground yet):

[attachment=16392:vehicle1.png]


#1Medo3337

Posted 19 June 2013 - 10:26 PM

I have create a vehicle in 3Ds Max and trying to adjust the wheels position in bullet physics.

 

I'm able to grab each wheel position by getting each wheel transformation matrix.

 

Though I'm not getting the wheels position same as the position in 3Ds Max, How can I adjust the wheels position to be exactly as in 3Ds Max model?.

 

The model consist of (chassis mesh, wheel1 mesh, wheel2 mesh, wheel3 mesh, wheel4 mesh), all in a single .x file.

D3DXMATRIX matWorld;
btVector3 connectionPointCS0;
bool isFrontWheel = true;

matWorld = wheel[0]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

matWorld = wheel[1]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

isFrontWheel = false;

matWorld = wheel[2]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

matWorld = wheel[3]->TransformationMatrix;
connectionPointCS0 = btVector3(matWorld._41, matWorld._42, matWorld._43);
m_vehicle->addWheel(connectionPointCS0,wheelDirectionCS0,wheelAxleCS,suspensionRestLength,wheelRadius,m_tuning,isFrontWheel);

PARTNERS