User Tag List

Results 1 to 4 of 4

Thread: pathfinding object question (moving object cuts corners)

  1. #1
    Fusion 2.5 (Steam)

    Join Date
    Mar 2016
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    pathfinding object question (moving object cuts corners)

    Hello.
    I'm trying to improve pathfinding algorithm for this example (attached)Pathfinding_q1.mfa, but object moving is extremely inaccurate (cuts corners etc).

    Can somebody please help me to fix it? Or maybe suggest some another better working solution?

    Thank you.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,156
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    You could try using a smaller character
    (or a bigger grid size )
    and/or set to 4-directions mode (or diagonal will anyway cut corners)

    a small grid allows for more "natural" movements,
    but keep in mind that your "collision shape" will be as big as the grid
    so if the player is bigger than a grid cell, he will end up overlapping walls

    and a small grid is of course also more "processor heavy",
    choosing the best fitting grid size is not trivial and quite important

  3. #3
    Fusion 2.5 (Steam)

    Join Date
    Mar 2016
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Works like a charm! Thank you!

    Wait, how to set to 4-directions mode.... I tried to do this, but it cuts corners anyway.... : Pathfinding_q2.mfa

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,156
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Change these two lines like this:



    (compare two general values... etc.)

    otherwise overlapping will trigger too soon --> cutting corners

Similar Threads

  1. Multiple pathfinding with Pathfinding Object
    By Erkabubben in forum Fusion 2.5
    Replies: 12
    Last Post: 16th July 2017, 08:54 PM
  2. Pathfinding Object + Platform Movement Object
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 5th June 2012, 05:44 PM
  3. Attach active object to a moving object and follow
    By Worf in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th January 2010, 07:50 PM
  4. Pathfinding with moving aim
    By Czentnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th January 2007, 11:47 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
  •