Ref:http://processing.org/discourse/yabb/YaBB.cgi?board=Contribution_Responsive;action=display;num=1045181982
After following through the trials of earlier P5'ers, whats the current status of this?
http://processing.org/reference/modelX_.html
'Coming soon...?'
Is this functino operational or not, if so can you give a working example? I've included the following in my code and it only does as I expect as long as I don't move the camera.
Code:float mouse3DX = modelX(width/2-mouseX, height/2-mouseY, mouseZ);
float mouse3DY = modelY(width/2-mouseX, height/2-mouseY, mouseZ);
float mouse3DZ = modelZ(width/2-mouseX, height/2-mouseY, mouseZ);
If I do move the camera, I get very strange results. I'm trying to use the mouse3DX and mouse3DY values.
Please take a look at the example I uploaded:
http://mkv25.net/applets/camera_and_3d_mouse/
Originally this was a test for importing OBJ files (stripped out) and then a camera control system (works very well).
To operate the red box/ship use the arrow keys.
To operate the camera, right click and drag to rotate, click middle button and drag vertically to zoom.
To centre the camera on the red box, press 'c'. To centre on the grid press 'r'. You can rotate the camera to a custom angle while centred on the red box.
My goal is to map the mouse coordinates to the onscreen grid. i.e./e.g. have the green box snap to the grid squares as the mouse rolls over them.