Zoom in

edited May 2013 in Help request
I was thinking that at some points I'd want to "zoom in" to different points on the map.

Would using autoscroll help with this sort of effect? Perhaps moving the camera in closer to an object?

Ideally I'd like to be able to do two different effects:
    none
  • Zooming where objects further in the frustum zoom less ("perspective" zoom?)
  • Zooming where the entire scene is considered "flat"none

In both cases, it would be desirable to have some elements not move or zoom (e.g. HUD type display)

Comments

  • edited May 2013
    epoulsen wrote:
    I was thinking that at some points I'd want to "zoom in" to different points on the map.

    Would using autoscroll help with this sort of effect? Perhaps moving the camera in closer to an object?

    Well yes and no, at least not for the effect you desire, I'm afraid.
    Ideally I'd like to be able to do two different effects:
      none
    • Zooming where objects further in the frustum zoom less ("perspective" zoom?)none
    none

    This one is going to be the hardest to achieve. You can actually achieve the opposite (similar to action movie/racing game FOV changes) by using the AutoScroll property. You can see an example in the tutorial #9: Scrolling.

    I'm not exactly sure how to achieve the opposite, probably by updating your objects scales depending on their distance from the camera, ie. by cheating. :)
      none
    • Zooming where the entire scene is considered "flat"none
    none

    This one is pretty easy: simply modify the camera zoom (orxCamera_SetZoom).

    Tip: I usually attach my camera as a child of a dummy orxOBJECT. This allows me to add FXs to the object and get smooth camera modifications (position, rotation and scale (ie. 1/zoom)), or a simple way to achieve camera shakes (you can look at Mushroom Stew for that).
    For the zoom control via a parent object, you'll need the latest from the hg repository though. :)
    In both cases, it would be desirable to have some elements not move or zoom (e.g. HUD type display)

    Any object that has the camera as parent will always remains fixed on screen, even when the camera's zoom changes.
  • edited May 2013
    Thank you!

    Before I ask these questions, I usually try to go to the API documentation and search for things, but the search doesn't seem to be able to handle substring matches. When I searched for "zoom", I got nothing, even though there's a function with "zoom" in it's name. Is there a better way to search the API? I seem to have better luck grepping the source.

    When I search on the forum, I have the opposite problem: lots of unrelated topics come up.
  • edited May 2013
    Ah yes, I'll try to upgrade the version of doxygen to see if that helps.

    Usually I search from within the code IDE (Visual Studio, XCode, Codelite, ...) to find function names (yes, I don't always remember all the names by heart ;)), grep sounds like a viable alternative too.
Sign In or Register to comment.