Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualMedo3337

Posted 14 June 2013 - 04:45 AM

I'm setting up a simple vehicle and trying to create a box and cylinder, so here is what I'm doing:

 

// Create a box and cylinder shapes for the vehicle
D3DXCreateBox(device, 2.0f, 1.0f, 4.0f, &meshChassis, NULL);
D3DXCreateCylinder(device, wheelRadius*0.5f, wheelRadius*0.5f, wheelWidth*0.5f, 20, 20, &meshWheels, NULL);

.

void Render()
{
D3DXMATRIX matTransformation;

btTransform trans;
m_carChassis->getMotionState()->getWorldTransform(trans);
matTransformation = btTransformToD3DXMATRIX(trans);

d3ddev->SetTransform(D3DTS_WORLD, &matTransformation);
meshChassis->DrawSubset(0);

// Code to render wheels here...
}

I also debug draw wireframe, and the final result is that the chassis position is not valid as the wireframe:

[attachment=16306:vehicle.png]


#8Medo3337

Posted 14 June 2013 - 04:44 AM

I'm setting up a simple vehicle and trying to create a box and cylinder, so here is what I'm doing:

 

// Create a box and cylinder shapes for the vehicle
D3DXCreateBox(device, 2.0f, 1.0f, 4.0f, &meshChassis, NULL);
D3DXCreateCylinder(device, wheelRadius*0.5f, wheelRadius*0.5f, wheelWidth*0.5f, 20, 20, &meshWheels, NULL);

.

void Render()
{
D3DXMATRIX matTransformation;

btTransform trans;
m_carChassis->getMotionState()->getWorldTransform(trans);
matTransformation = btTransformToD3DXMATRIX(trans);

d3ddev->SetTransform(D3DTS_WORLD, &matTransformation);
meshChassis->DrawSubset(0);

// Code to render wheels here...
}

I also debug draw wireframe, And the final result is that the chassis position is not valid as the wireframe:

[attachment=16306:vehicle.png]


#7Medo3337

Posted 14 June 2013 - 04:44 AM

I'm setting up a simple vehicle and trying to create a box and cylinder, so here is what I'm doing:

 

// Create a box and cylinder shapes for the vehicle
D3DXCreateBox(device, 2.0f, 1.0f, 4.0f, &meshChassis, NULL);
D3DXCreateCylinder(device, wheelRadius*0.5f, wheelRadius*0.5f, wheelWidth*0.5f, 20, 20, &meshWheels, NULL);

.

void Render()
{
D3DXMATRIX matTransformation;

btTransform trans;
m_carChassis->getMotionState()->getWorldTransform(trans);
matTransformation = btTransformToD3DXMATRIX(trans);

d3ddev->SetTransform(D3DTS_WORLD, &matTransformation);
meshChassis->DrawSubset(0);

// Code to render wheels here...
}

I also debug draw wireframe, And the final result is that the chassis position is not valid as the wireframe:

[attachment=16306:vehicle.png]


#6Medo3337

Posted 14 June 2013 - 04:44 AM

I'm setting up a simple vehicle and trying to create a box and cylinder, so here is what I'm doing:

 

// Create a box and cylinder shapes for the vehicle
D3DXCreateBox(device, 2.0f, 1.0f, 4.0f, &meshChassis, NULL);
D3DXCreateCylinder(device, wheelRadius*0.5f, wheelRadius*0.5f, wheelWidth*0.5f, 20, 20, &meshWheels, NULL);

.

void Render()
{
D3DXMATRIX matTransformation;

btTransform trans;
m_carChassis->getMotionState()->getWorldTransform(trans);
matTransformation = btTransformToD3DXMATRIX(trans);

d3ddev->SetTransform(D3DTS_WORLD, &matTransformation);
meshChassis->DrawSubset(0);

// Code to render wheels here...
}

I also debug draw wireframe, And the final result is that the chassis position is not valid as the wireframe:

[attachment=16306:vehicle.png]


#5Medo3337

Posted 14 June 2013 - 03:34 AM

I'm setting up a simple vehicle and trying to create a box and cylinder, so here is what I'm doing:

 

// Create a box and cylinder shapes for the vehicle
D3DXCreateBox(device, 2.0f, 1.0f, 4.0f, &meshChassis, NULL);
D3DXCreateCylinder(device, wheelRadius*0.5f, wheelRadius*0.5f, wheelWidth*0.5f, 20, 20, &meshWheels, NULL);

.

void Render()
{
D3DXMATRIX matTransformation;

btTransform trans;
m_carChassis->getMotionState()->getWorldTransform(trans);
matTransformation = btTransformToD3DXMATRIX(trans);

d3ddev->SetTransform(D3DTS_WORLD, &matTransformation);
meshChassis->DrawSubset(0);

// Code to render wheels here...
}

I also debug draw wirefire, And the final result is that the chassis position is not valid:

[attachment=16306:vehicle.png]


#4Medo3337

Posted 14 June 2013 - 03:34 AM

I'm setting up a simple vehicle and trying to create a box and cylinder, so here is what I'm doing:

 

// Create a box and cylinder shapes for the vehicle
D3DXCreateBox(device, 2.0f, 1.0f, 4.0f, &meshChassis, NULL);
D3DXCreateCylinder(device, wheelRadius*0.5f, wheelRadius*0.5f, wheelWidth*0.5f, 20, 20, &meshWheels, NULL);
void Render()
{
D3DXMATRIX matTransformation;

btTransform trans;
m_carChassis->getMotionState()->getWorldTransform(trans);
matTransformation = btTransformToD3DXMATRIX(trans);

d3ddev->SetTransform(D3DTS_WORLD, &matTransformation);
meshChassis->DrawSubset(0);

// Code to render wheels here...
}

I also debug draw wirefire, And the final result is that the chassis position is not valid:

[attachment=16306:vehicle.png]


PARTNERS