Longtime listener, firsttime caller.
I'm making a simple 2D game with openGL ES 2.0. In order to scroll in my ViewController I do the following:
self.effect.transform.projectionMatrix = GLKMatrix4Translate(self.effect.transform.projectionMatrix, 0,scrollDy,0);
This works fine except if I want to scroll outside of the ViewController class (by passing a GLKBaseEffect pointer) class I cannot access it as the transform is protected.
I have 2 questions:
- How do I scroll outside of the ViewController class?
- Given that I eventually want to parallax scroll with a background is the above method even a sensible way of doing it?