General problems - mesh.Box | indices | DrawPrimitives

Hey there

I have been having some problems, and although i keep trying to solve them i cannot seem to do so.

Basically, i have a plane of polygons rendered in my engine, with heightmaps determining their height. I want to put a square/cube at a certain height in the middle of it to represent the sea level.

However, when I load a mesh.Box() or use square vertices, I cannot do this, as it renders in the wrong position.

It also links to the previous vertex, but i cannot change this because if indices.

It is too complicated to explain here, but i really need a 'mentor' or - consultant, who i can MSN regarding my project from time to time.

My MSN is jamespraveen@aol.com and i would greatly appreciate this.



Answer this question

General problems - mesh.Box | indices | DrawPrimitives

  • Sanjiro

    If you are rendering a terrain such as you are doing now and want to place a plane/flat box in a particular place you could regard both of them as an entity. With entities you could use transformation matrices to set each's position in the world. With this said you could set the terrain's position like Matrix.Translation(0.0f, 0.0f, 0.0f) and then render the terrain and then when you want to place the plane/box on another level you could then just set the new transformation matrix for the box/plane with Matrix.Translation(0.0f, 0.0f, 0.0f).

    I hope this helps a bit.
    Take care.
    PS: if you are still stuck after this I would love to help you out and will add you on MSN and provide you with the needed assistance if I can.


  • Mike Green

    Yeah that'd be great if you could add me to MSN, thanks a lot:


    jamespraveen@aol.com




  • General problems - mesh.Box | indices | DrawPrimitives