Jump to content
  • Advertisement
Sign in to follow this  

My truck model edge cannot "park" completely to the dock leveler

This topic is 2175 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

[attachment=17222:pic 1 lorry model.png]


[attachment=17223:pic 2 warehouse model.png]


[attachment=17224:pic 3 direct3d render.png]


I can tell that the edge is exactly at the location what 3ds max indicated

with y and z swapped.


So 82, 0.53 in max, and 0.53, 82 in Direct3D

// load Dock Leveler Edge
        FILE *dockEdgeFp = fopen ("data\\dock_edge.sim", "rb");
        float dockx, docky, dockz = 0.0f;
        fread(&dockx, sizeof(float), 1, dockEdgeFp);
        fread(&dockz, sizeof(float), 1, dockEdgeFp);
        fread(&docky, sizeof(float), 1, dockEdgeFp);

        mLorryMesh = new SkinnedMesh(m_d3dCaps);


        m_vRenderObjects.push_back(new Lorry(mLorryMesh, this));
        D3DXVECTOR3 lorry1pos = mWarehouseMesh->GetPosition("Lorry001");

        D3DXVECTOR3 lorry1actualpos;
        lorry1actualpos.x = lorry1pos.x;
        lorry1actualpos.y = docky;
        lorry1actualpos.z = dockz;

Sorry this code snippet is a little bit weird

I have a lorry dummy placeholder where I want only its x value and grab the y and z value off another file

and combine them together, also weird is I temporarily mix up the y and z values. But don't worry, but

Why still the edge of the trailer of the truck can't reach the dock leveler?



Edited by lucky6969b

Share this post

Link to post
Share on other sites

hello again.

you could place a bone at the trucks tail end and use the bone a back locator.. try it out.

only if you like  pina coladas.

Share this post

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

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!