Jump to content

  • Log In with Google      Sign In   
  • Create Account

Anddos

Member Since 01 Nov 2002
Online Last Active Today, 12:28 PM

Posts I've Made

In Topic: using coldet collison library on d3d9 3d models

Today, 12:07 PM

Nevermind i have it working, it was something todo with the way i was creating the sphere, a quick test in a new application

 

http://i.imgur.com/tcOct06.png?1


In Topic: using coldet collison library on d3d9 3d models

Today, 08:55 AM

yeh ive compiled the colder library in debug now and debugged the application it seems its crashing on the mesh locking vertexbuffer and i dont know why, i am using this function in another class to retrieve the vertices of the weapon without any issues,

 

LoadXFile("ak47.x", &mMesh, mMtrl, mTex);
 LockMesh();

 

i am  also checking if the mesh object is not null

 

 

if (Sphere != NULL)
{
       MessageBox(NULL, "Sphere", "", 0); //this shows
}

 

i am baffeled at this point

 

screenshot of where debugging stops

 

http://i.imgur.com/UEC4EJa.png?1


In Topic: Drawing a quad in normalized device coordinates

Yesterday, 10:31 PM

Thanks i sort of understand it, but it is strange to me


In Topic: how to make a 3D Objbect move in circle?

19 October 2014 - 08:39 AM

its moving in a  wheel type movement, i wanted a helicoper rotor type motion


In Topic: how to make a 3D Objbect move in circle?

19 October 2014 - 08:21 AM

Thanks for the reply, i am doing this,but the box is just stuck in the same position

 

D3DXVECTOR3 Lazer::getPositionInSphere(D3DXVECTOR3 sphere_center, float radius, float theta, float phi)
{
    return D3DXVECTOR3(sphere_center.x + radius * sin(theta) * sin(phi),
        sphere_center.y + radius * cos(theta),
        sphere_center.z + radius * sin(theta) * cos(phi));
}

void Lazer::UpdateLazer(float dt)
{
    float angle = 0.0f;
    angle += dt*D3DX_PI / 4; //rotate 45 degrees per seconds

    if (angle > 2 * D3DX_PI)
        angle -= 2 * D3DX_PI;

    D3DXVECTOR3 sphere_center(0.0f, 100.0f, 0.0f);
    LazerPos = getPositionInSphere(sphere_center, 2.0f, angle, D3DX_PI / 2);
    D3DXMatrixTranslation(&matTrans, LazerPos.x, LazerPos.y, LazerPos.z);

    
}

PARTNERS