Camera or viewport

I was wondering if their is any support or an API for a viewport/camera. When I say camera, I'm not referring to the physical visual input device on your phone, but rather a way to zoom in or pan around a part of the stage without manually affecting the current objects locations or scale.

Say I develop a scene to fit perfectly in my screen. Then I want to zoom in to only see the top left corner. Is there anything like viewport.show(0,0, display.contentWidth/2, display.contentHeight/2)?

Thanks. If there is could you point me to the documentation or sample code?

There is not, no. (Although you could make a post in Feature Requests - the subscriber one, not the free one.)

Peach :)

Our fellow developer Graham Ranson ("Lime" author) has as free camera module on his website that provides translation,rotation, scale, transitions, parallax scrolling, dragging, clamping, and object following.
Check it out at http://www.grahamranson.co.uk/lib.php?id=5

Ken

Thanks @Peach & @DVD Guy for the quick response.

I will look further into Graham's solution. Is there any documentation on how to use it?

Thanks

No, but there is a sample included. You can uncomment sections to perform different functions, and I seem to remember the source being self-explanatory.

Ken

views:1477 update:2011/12/2 15:07:10
corona forums © 2003-2011