User Tag List

Results 1 to 6 of 6

Thread: Viewport Zoom Help

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Viewport Zoom Help

    Hi all,

    I'm currently trying to make a zoom function using the viewport object. but I'm having two problems, One is scrolling, when I move the player the viewport doesn't track correctly and the other is when I zoom out it just shrinks what I see and draws a black border around the edge instead of showing me more.

    I'll post my file in the file archives.

    Any Ideas?

    Help is appreciated.

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Viewport Zoom Help

    To fix the black border, you have to set the window to a size of more than 250x250 (so I'd set it to... 1000x1000) then resize the window to 250x250 using the window control object. This is making MMF2 draw more than what's on the screen.

    I have no idea what the problem is with the scrolling thing.

  3. #3
    No Products Registered

    Join Date
    Aug 2006
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Viewport Zoom Help

    How do I do this? could you make an example?

  4. #4
    No Products Registered

    Join Date
    Oct 2007
    Location
    MA
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Viewport Zoom Help

    From what I can tell you can't zoom out with this object past the starting res of the screen only in. I'm not on my home computer with my project right now but I"ll look up details when I get a chance prolly this weekend.

  5. #5
    No Products Registered

    Join Date
    Oct 2007
    Location
    MA
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Viewport Zoom Help

    OK so on startup set the viewport objects position to 0,0

    Then set the source region to center and center it on your charcter or whatever the scrolling camera is bound to.

    Set the center x and center y values to 1/2 the resolution that your game sets the screen too.

    Then set the width and hight to the resolution of your screen.

    Then create a counter or something that stores your zoom amount. Lets call it "zoom"

    Then on whatever event you want the screen to zoom add the "zoom" counter to the width and hight values of the viewport object.

    To zoom back out just subtract the "zoom" value from the viewport object

    Make sure you never zoom out past the max rez or you will get the black boxes.

    As far as I can tell you can never zoom out past the screen rez just in .

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Viewport Zoom Help

    Actually, does anyone know what's happened to the Viewport Object? I could REALLY use it right now! I've looked all over the net and the links seem to be broken, and the one I did manage to find was a 'bad file'. What's up with that?? I hope someone can help : S

Similar Threads

  1. Cant't find Zoom in and Zoom out shortcuts for MMF2 developer...
    By Villmaxie in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 17th November 2014, 11:01 PM
  2. need viewport example
    By lover in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 8th November 2008, 12:20 PM
  3. ViewPort Bug
    By dragonguy in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 9th April 2008, 11:24 PM
  4. viewport.mfx
    By JoshHarris in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th March 2008, 03:54 PM
  5. Viewport Zoom Help File
    By YAS in forum File Archive
    Replies: 0
    Last Post: 19th November 2007, 12:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •