# Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

### DarkBASIC Professional Discussion / Meshes And Vertices help.

Message
Posted: 15th Feb 2018 07:37
I can't figure this out...

I make a plane at position 0,0,0
I rotate the plane 90 degrees
now the plane is 0.5 off from the left and right

say I want it on the left side of 0,0,0 without doing a position -0.5

how can I make a mesh and move that plane the -0.5 I need?

I can see how to add meshes and change the vertex data to move the newly added mesh into a relative position of the one I'm adding to. (but then I have to add 0.5 to all the position statements after making the object from the mesh data, I don't want to do that.)

What I can't figure out is how to change the first mesh before I start adding other meshes and subtract the 0.5 off that first mesh after the rotation.

make object plane 5,1,1
rotate object 5,0,90,0
make mesh from object 5,5
// remove that damn 0.5! LOL

Now want I want to do is, get rid of that .05 f distance from the rotation in the mesh before I start adding the next mesh

can I do that somehow with the vertex commands?
Posted: 15th Feb 2018 09:59 Edited at: 15th Feb 2018 11:14
So, I solved my dilemma.

create a plane (10) to use as a dummy
rotate plane 10, 90 degrees
create my other planes (front right back left)

Gimme the codez!!!??

OK! the magic code was!

//DELETE ALL THE VERTEX DATA FROM THE DUMMY MESH. DO THIS FIRST
lock vertexdata for mesh 10
DELETE MESH FROM VERTEXDATA 0,GET VERTEXDATA VERTEX COUNT(),0,GET VERTEXDATA INDEX COUNT()
unlock vertexdata

then I just add to mesh 10 my other planes with their relative offset and no global 0.5 offset!

position 0,0,0 is now truly 0,0,0 for my plane box!

I don't know if that's the most efficient way, but it works.