User Tag List

Results 1 to 6 of 6

Thread: How to save coordinates when moving and scaling object

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    evi1ove's Avatar
    Join Date
    Jun 2014
    Location
    Kyiv, Ukraine
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to save coordinates when moving and scaling object

    I would like to find out from you the next information. Can you advice how to save coordinates when moving and scaling one object in relation to another?
    There is an object 1, it moves along the X axis, there is an object 2, it does not move.
    There is a zoom button by clicking on it, both objects decrease by half. How is it possible to keep the coordinate on X of object 1 with respect to object 2?
    Attached files Attached files

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 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
    Dec 2010
    Posts
    173
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    At it's simplest you just need to scale the difference in x and y at the same time as you scale the object. This mfa has one object as the centre and scales the other two objects including the offset.I've also scaled the movement speed.
    Zoom.zip
    for a game engine you'd probably want to separate to the zoom you're at and the zoom level you're going to. Values are your friends

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    evi1ove's Avatar
    Join Date
    Jun 2014
    Location
    Kyiv, Ukraine
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JohnArtbox View Post
    At it's simplest you just need to scale the difference in x and y at the same time as you scale the object. This mfa has one object as the centre and scales the other two objects including the offset.I've also scaled the movement speed.
    Zoom.zip
    for a game engine you'd probably want to separate to the zoom you're at and the zoom level you're going to. Values are your friends
    Thank you very match, mate!

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    evi1ove's Avatar
    Join Date
    Jun 2014
    Location
    Kyiv, Ukraine
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by JohnArtbox View Post
    At it's simplest you just need to scale the difference in x and y at the same time as you scale the object. This mfa has one object as the centre and scales the other two objects including the offset.I've also scaled the movement speed.
    Zoom.zip
    for a game engine you'd probably want to separate to the zoom you're at and the zoom level you're going to. Values are your friends
    Thank you for your help, but can you advice with another small nuance.
    If you make object 2 Drag and Drop movement and move it, how to make it so that object 1 also always moves with it? At the same time, "zoom" should also work.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCHTML5 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
    Dec 2010
    Posts
    173
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Six new values, 4 on the drag object, StartX and StartY( which pick up you position at the beginning of the dragging) and CurrentX and CurrentY(which allow you to keep track of how far the drag object has moved) then OffsetX and OffsetY on the moving object to keep the space between the two objects constant.
    Zoom&Drag.zip

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)iOS Export Module (Steam)
    evi1ove's Avatar
    Join Date
    Jun 2014
    Location
    Kyiv, Ukraine
    Posts
    69
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by JohnArtbox View Post
    Six new values, 4 on the drag object, StartX and StartY( which pick up you position at the beginning of the dragging) and CurrentX and CurrentY(which allow you to keep track of how far the drag object has moved) then OffsetX and OffsetY on the moving object to keep the space between the two objects constant.
    Zoom&Drag.zip
    Thank you for your advice. I meant a little bit another thing but this variant is even better. I thought a lot and made exactly as i wanted, using your example. Once again, thank you for ideas.
    My variant Zoom&Drag.mfa may bee someone needs.

Similar Threads

  1. Scaling game at runtime to save memory?
    By lachmandoo in forum iOS Export Module 2.5
    Replies: 2
    Last Post: 17th March 2016, 04:10 AM
  2. Scaling and Moving Issue
    By XStar in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 23rd October 2012, 11:42 PM
  3. Object coordinates - what are the constraints?
    By Dines in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd February 2012, 04:59 PM
  4. Create Object to X and Y coordinates
    By lorin in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 13th November 2010, 02:46 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
  •