Forums > Jitter

OpenGL and Jit.matrix co-ordinate issues

April 6, 2014 | 10:38 am

Hi, I am making a patch that generates a 2 dimensional maze and am wanting to display it using openGL.My maze generator outputs a 1 plane 2d matrix describing the maze,each cell having a value of either 1 for wall or 0 for path.

I am using jit.gl.multiple and jit.phys.multiple objects to create multiple rigid bodies and gridshapes (cubes representing walls). I can organise these into a grid by sending a 15 15 position matrix. My plan was then to hide the gridshapes by setting their scale to 0, which is the value my generator outputs when a cell is a path.

When I do this however the maze appears mirrored, and I cannot figure out why!

to use the patch read the provided demo_Maze.jfx.jit into the jit.matrix scale object just above the pwindow, and bang it to output. The pwindow shows how I expected the maze to look in the glMaze window.

Thanks for reading

– Pasted Max Patch, click to expand. –

April 6, 2014 | 10:40 pm

just use jit.dimmap:

– Pasted Max Patch, click to expand. –

April 7, 2014 | 5:53 am

Wow, this is perfect. Thanks!


Viewing 3 posts - 1 through 3 (of 3 total)