Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Bullet Gap between the wheels and the chassis?

This topic is 384 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

//synchronize the wheels with the (interpolated) chassis worldtransform
l_vehicle->updateWheelTransform(j,true);
const btTransform& t = l_vehicle->getWheelInfo(j).m_worldTransform;
D3DXMATRIX l_mat = BT2DX_MATRIX(t);

D3DXMATRIX l_rot;
D3DXMatrixRotationY(&l_rot, 1.57f);

l_mat = l_rot * l_mat;

// assume front wheels
AgentMotionState* motion
	= dynamic_cast(l_vehicle->getRigidBody()->getMotionState());

if (motion)
{
boost::shared_ptr pObj = motion->m_object;
if (j==0) 
{ 
	D3DXVECTOR3 s, p;
	D3DXQUATERNION r;
	D3DXMatrixDecompose(&s, &r, &p, &l_mat);
	double yaw, pitch, roll;
	yaw = pitch = roll = 0.0f;
	QuatToEuler(r, yaw, pitch, roll);
	TRACE("Veh: " << i << "Pos of wheel 0 is " << p.x << " " << p.y << " " << p.z);
	yaw = CapRadian(yaw);
	TRACE("Veh: " << i << "Rot of wheel 0 is " << yaw);
	FRAME* frontWheels = (FRAME*)D3DXFrameFind(pObj->m_mesh->GetFrameRoot(), "Front_Left_Wheel");
	frontWheels->matCombined = l_mat; 
	//frontWheels->TransformationMatrix = l_mat;
}



Looks like the left front wheel is on the far left of the chassis with a large gap?
Why is that?
Thanks
Jack

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!