Mojo2 screen scrolling using SetCameraMatrix()

Monkey Forums/Monkey Code/Mojo2 screen scrolling using SetCameraMatrix()

Richard Betson(Posted 2015) [#1]


Hi,

I have started to get my head around what Mark is up to with mojo2 'Renderer'. Below is a modified version of Marks 'Renderer' demo (just save it in his modules/mojo2/bananas/rendererdemo folder) which uses SetCameraMatrix() to move the camera view around (in this case side scrolling) the renderer scene.

Pretty cool Mark S, seeing this working. :)

Edit- I made a little progress video for my crew and posted it here as well. ;)




Richard Betson(Posted 2015) [#2]
You can use this to get it to orbit. Just replace the similar line in 'OnRender'
renderer.SetCameraMatrix([1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 500+(Sin(cc)*100),100+(Cos(cc)*50),0.0,1.0])