User Tag List

Results 1 to 9 of 9

Thread: Move to point Parallax problem

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Question Move to point Parallax problem

    I made a thread a while ago about making a bird AI and I have the bird moving now to a spot on a tree. It worked fine, however once I put it on a layer with a parallaxing coefficient it got messed up and the bird no longer goes to the spot it is supposed to, but stops long before it (it happens about 90% of the time and everything is on a single layer)

    Do anyone know how to fix this? I have uploaded an example where you can move the camera with the S and D keys to see the point the bird is supposed to land on and how he does not fly to the correct spot. If I change the layer back to a coefficient of 1.0 everything works as it should.
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    6 people have viewed it but no one have any idea what can be wrong? :/

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,250
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)
    I have spent a lot of time trying to figure out the ins and outs of parallax. Like seriously, a lot. I'm talking days or weeks at a time, on and off over the past few years. I still can't get my head fully around it. Even though it seems on the surface like it should be very straight forward. It's basically become my White Whale at this point.

    I'm no math wiz by any stretch of the imagination, so it certainly doesn't mean that the solution isn't within easy reach of a more mathematicallly competent mind than my own. But I do think the subject is more opaque than most people would initially assume.

    There's another thread about parallaxing somewhere where I posted some equations I came up with to help neutralise camera movements when calculating the x position of parallaxed objects. Perhaps they'll help.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    937
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    Same here, I've never found a real solution to this issue. What I do as a workaround is calculating everything based dummy objects placed on a reference layer that has a 1.0 coefficient.
    So for example if you've an object on a layer 1 with coeff 0.5 and one on layer 2 with coeff 0.7 and want to compare their X position, create one dummy on each of them, move both dummies to layer 3 (with coeff 1.0) within the same event and grab the dummy coordinates for comparison instead.
    This works for very simple tasks but adapting it on multiple objects and a more complex setup like yours seems to be a lot for effort tbh...

  5. #5
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    643
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    The object's position changes when a parallax happens. This is most likely the cause of your issue. What's compounding the problem is that you're using the easing object: you're stuck in a path that goes from your bird's original position to the tree's position when the easing started. It doesn't account for the change in position by the parallax (and you can't change the path dynamically using the easing object since it's based on a T value afaik).

    I don't know much about correcting this myself. Hopefully someone knowledgeable drops in to help get it sorted.

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Julian82 View Post
    Same here, I've never found a real solution to this issue. What I do as a workaround is calculating everything based dummy objects placed on a reference layer that has a 1.0 coefficient.
    So for example if you've an object on a layer 1 with coeff 0.5 and one on layer 2 with coeff 0.7 and want to compare their X position, create one dummy on each of them, move both dummies to layer 3 (with coeff 1.0) within the same event and grab the dummy coordinates for comparison instead.
    This works for very simple tasks but adapting it on multiple objects and a more complex setup like yours seems to be a lot for effort tbh...
    Hmm, would this work with the easing object also?

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    937
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Outcast View Post
    Hmm, would this work with the easing object also?
    I really can't tell, never used this object. In theory I kind of think yes, but the pairing routine to make sure it grabs the right values for each bird seems pretty complex to set up :/

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,156
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Julian82 View Post
    I really can't tell, never used this object. In theory I kind of think yes, but the pairing routine to make sure it grabs the right values for each bird seems pretty complex to set up :/
    But I could understand if things got messy if things where on different layers with different parallaxes, but what I don't understand is why it gets like this when everything and all objets are on the same layer?

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    937
    Mentioned
    47 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Outcast View Post
    But I could understand if things got messy if things where on different layers with different parallaxes, but what I don't understand is why it gets like this when everything and all objets are on the same layer?
    Yes, you're right, simple comparisons should work if everybody is on the same party, but I've no idea about the easing object, my guess is that the issue in your example lies within its inner workings.

Similar Threads

  1. Raycasting extension, how do i move the spawn point?
    By SubWooferX3 in forum Fusion 2.5
    Replies: 3
    Last Post: 1st August 2015, 11:00 PM
  2. Move straight from one point to the next?
    By Konidias in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 28th July 2012, 08:14 PM
  3. move around point towards object
    By Bigfoot in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 9th July 2010, 09:12 AM
  4. Coordinates +1 movement, move to specifies point
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 22nd December 2009, 11:16 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
  •