OpenGL Lines problem

Hello guys, I scripted a simple "room" generator, I only made the floor code but I realized that I have this problem, Could you tell me how to fix it? Thanks for read. http://gyazo.com/75e4f863cef313280ac35f69f51e9c9b

The generator is now like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    for (int x = 1; x <= _dimension.x; x++)
    {
        for (int z = 1; z <= _dimension.z; z++)
        {
            Entity.CreatePlane (Vector3(_position.x+(x*4), _position.y, _position.z+(z*4)), Quaternion(0, 0, 0), Vector3(2, 0, 2), Color::Cyan, -1);    ///PLANE

            Entity.CreateRay (Vector3(_position.x+(x*4)-2, _position.y+0.02, _position.z+(z*4)-2), Quaternion(0, 0, 0), Vector3(4, 1, 1), Color::Black, -1);    ///RAY
            Entity.CreateRay (Vector3(_position.x+(x*4)-2, _position.y+0.02, _position.z+(z*4)+2), Quaternion(0, 0, 0), Vector3(4, 1, 1), Color::Black, -1);    ///RAY
            Entity.CreateRay (Vector3(_position.x+(x*4)-2, _position.y+0.02, _position.z+(z*4)+2), Quaternion(0, 90, 0), Vector3(4, 1, 1), Color::Black, -1);    ///RAY
            Entity.CreateRay (Vector3(_position.x+(x*4)+2, _position.y+0.02, _position.z+(z*4)+2), Quaternion(0, 90, 0), Vector3(4, 1, 1), Color::Black, -1);    ///RAY

            /*ceiling[z] = Entity.CreatePlane (Vector3(15, 1, 0), Quaternion(0, 0, 0), Vector3(2.5, 0, 2.5), Color::Cyan, -1);
            Entity.CreateRay (Vector3(2, 1.03, 2), Quaternion(0, 0, 0), Vector3(4, 1, 1), Color::Black, -1);*/
        }
    }
Last edited on
Topic archived. No new replies allowed.