User Tag List

Results 1 to 4 of 4

Thread: Trouble moving an object

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trouble moving an object

    Hi, I'm new here so I hope this hasn't been posted before. I tried searching, but didn't find much that was useful.

    I have two objects. One is supposed to move to the location of the other. Let's say Object A is the one I want to move and Object B is the destination. I set it up so that if the x coordinate of Object B is greater than the x coordinate of Object A, then A changes it's x coordinate position by +1. If x of B is less than x of A, then A's x coordinate changes by -1. Same with the y coordinate. This works fine, but I wanted to have different speeds so instead of changing the position by 1, I tried 0.5.

    The problem is that with 0.5 plugged in, Object A will only move negative along the axis; it'll go up or to the left, but not down or to the right. I don't know if this is a bug or something where the math is canceling out or what, but I'd appreciate any help or ideas. If you need any extra info, let me know and I'll post it. Thanks.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    happygreenfrog's Avatar
    Join Date
    May 2011
    Location
    I.L.T.D.O.I.R (I.L.T.D.O.I.R's Location: The Dimension Of Infinite Recursion)
    Posts
    4,307
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Are you using build 255 of MMF2? Or are you using the demo version?

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    It's the usual problem of object positions not storing floats. You just need to store the X and Y coordinates in alterable values (which do support floats), and then always set the object position to those.
    If you do a search, you should find plenty of related questions, as this is something that comes up a lot.

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everything appears to be up to date.

    Thanks, MuddyMole, I'll give that a try.

Similar Threads

  1. Still having trouble dealing with multiple instances of one object
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st December 2013, 10:33 PM
  2. Trouble with Object Detection and Update
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 13th March 2013, 08:33 PM
  3. Trouble getting object to invert color on/off
    By JollyPanda in forum File Archive
    Replies: 3
    Last Post: 22nd July 2010, 11:59 AM
  4. trouble with active picture object
    By BrashMonkey in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st September 2009, 09:58 PM
  5. Having trouble wiht Picture object !
    By Rushino in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th February 2007, 03:11 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
  •