User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Scale up and down layer

  1. #1
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scale up and down layer

    Hi all,

    a bit late on the boat! I'm going to port 3 commercial games to iphone/ipad so hopefully this will give more to show on Clickteam's iphone portfolio.

    So I've spent the past few days doing the homework, reading past discussions, bugs, fixes, iOS documentation available on Apple and on the installer and also playing with files uploaded here. However I could not find answer to this:

    How to I scale up and down an entire layer with "pinching" gesture? I've found a nice example but it was using an object only. Is it currently possible?

    Thanks


  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: Scale up and down layer

    There is no easy way of doing this. You have to detect the gesture using the Multiple touch object, and then set the zoom factor of all the objects of the layer manually.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Apr 2007
    Location
    Australia
    Posts
    1,152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale up and down layer

    Might be able to use the viewport object if it ever gets ported

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Scale up and down layer

    Viewport object is a software-only effect (though it could work in compatibility mode with HWA but very slow)

    It would not benefit iOS games at all.

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale up and down layer

    I see a few problems with a non automatic way of zooming an entire layer.. perhaps we can work it out.

    1)No background image, just actives.. perhaps this will give performance issue (a big active object as background)?

    1) the biggest problem is that objects always scale up in their own axis (hot spot). See image attached. The zoom would look very messed up this way. So, would be at all possible to select a group.good (like all objects to be scaled in a layer) and center their hotspot so the zoom in happens as it should? I'm open to suggestions because there is no way to release hidden object games in iphone if people can't zoom in to see it.

    Thanks
    Images attachées Images attachées

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale up and down layer

    An idea... would be possible an extension, action or anything that pick up all objects in a group and set their hotspot according to an object? Just the way set position relative to another object works, but with hotspots and automatic?

    edit: no I don't think this would work the way I thought. hopefully this image will clear it out.


    Uploaded with ImageShack.us

    edit2: If Francois or Andos could check out this game:

    PuppetShow: Mystery of Joyville

    when you enter a hidden object scene it shows you can zoom in certain areas back and forth.

  7. #7
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale up and down layer

    Here is my reference.. as you can see, user can pinch specific areas, zoom in and out
    http://youtu.be/5W4ZS5AJW9g

    This is the best I could achieve so far... with original file from AndyH and drag and drop help from Andos

    http://www.brutomemo.com/temp/pinch_scale_TEST_group.mfa

    I'm having trouble to keep background image and grouped images as whole and centered while navigating/pinching back and forth.. anyone can please help?

    Many thanks


    edit: Andos, by the way.. the compatibility mode between Viweport object and HWA, on iOS would be terribly slow? Even slower than scaling up a huge background images and about 30 small objects attached to it?

  8. #8
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale up and down layer

    Yes you'll have to move the objects too.

    You'll need some trig.

    When the user places their 2nd finger on the screen calculate the distance between their fingers and calculate the mid-point between.

    Then calculate the distance and angle between all the objects to be scaled and the mid-point.

    Then just use trig to reposition the objects as the screen is scaled.

    so the X of each object would be: cos(angleFromMidpoint)*scaleFactor
    the Y: sin(angleFromMidpoint)*scaleFactor


    This method will unfortunately lag if you have too many objects, but it's the best I could come up with.

  9. #9
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale up and down layer

    Thanks Urbanmonk.. I'm trying this with a fresh start.. I'll let you know if a doubt arises

  10. #10
    No Products Registered

    Join Date
    Jun 2006
    Posts
    1,630
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Scale up and down layer

    apparently the red object is stuck in the upper left corner with this formula. I had an example of angle between objects, still trying to find it but tests with fixed angle is making the object stuck. Would you mind tweaking that file uploaded?

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Setting the Scale of an Object to the Scale of the Object it was Created From
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th July 2013, 07:53 PM
  2. Layer Object: Moving X and Y of layer is very slow
    By Bipolar_Games in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 5th April 2013, 01:19 AM
  3. Creating a new Layer: Layer referrances
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th October 2012, 11:44 AM
  4. Layer Object can't move counters to specific layer
    By JoKa in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th November 2007, 11:11 AM
  5. Bug when moving a layer with layer object
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 2nd July 2006, 11:40 PM

Posting Permissions

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