User Tag List

Results 1 to 5 of 5

Thread: Moving objects and then checking for collision doesn't work during frame start

  1. #1
    Clicker Fusion 2.5iOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Moving objects and then checking for collision doesn't work during frame start

    Something strange is going on with how collisions are detected between objects during frame start.

    The scenario is this, I have 3 different active objects with different starting positions. At frame start I place 2 of the 3 objects on top the 3rd object and then I see if the 2 moved objects are overlapping or colliding. This fails every time if done during frame start. Otherwise it works as it should.

    Code:
    *Start of Frame: 
    	-> Move "Obj1" to "Obj2"
    	-> Move "Obj3" to "Obj2"
    
    *Start of Frame
    +Obj1 is overlapping Obj3
    or
    *Start of Frame
    +Obj3 is overlapping Obj1
    	-> End Application
    
    *Start of Frame
    +Collision between Obj1 and Obj3
    or
    *Start of Frame
    +Collision between Obj3 and Obj1
    	-> End Application

    The same problem was discussed in this thread.

    Thanks!

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I can tell you what the problem is.
    This is just how MMF2 works, and is also the reason why Moving Platforms for Platform Games are so hard to create.

    ...
    When doing overlap and collision tests, there are Collision Masks for each Object running behind the curtains wich handle this.

    When you do a condition like:
    - ObjectA is overlapping ObjectB
    ..or..
    - ObjectA collides with ObjectB

    Only the Collision Mask for ObjectA is updated to its new position, while ObjectBs Collision Mask is not updated and remains at the possition before ObjectB was moved.
    Collision Masks are also automatically updated each time the game screen is redrawn ( end of each Event Editor itteration ).

    ...
    Check out this example if you dont believe me.
    Attached files Attached files

  3. #3
    Clicker Fusion 2.5iOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the explanation King_Cool, I figured the problem was something like that.

    So apart from spending an extra frame for the collision masks to update there's nothing one can do about it? That's kind of a letdown...

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No there is nothing you can do to manually uppdate the collision masks.

    However if you do square 'box type' collision/ overlap checking by compairing to the Objects X and Y coordinates, you can overcome this problem.
    I have done this for my Platform Engine and collision tests are pixel perfect and flawless.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export ModuleUnicode Add-on

    Join Date
    Jun 2006
    Location
    Australia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I made a post about this back in May:

    http://community.clickteam.com/showthread.php?t=70742

    I actually think it's a recent change, but I could be wrong. I'm not sure if it was always like that.

Similar Threads

  1. After a few seconds, moving objects right doesn't work
    By SuperDisk in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 21st June 2013, 08:58 PM
  2. ["BUG"] Start of Frame + collision detection with creation of new objects
    By netninja in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 11th May 2012, 08:49 AM
  3. Load Frame on actives doesn't work?!
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th June 2008, 09:03 PM
  4. [Phyzix] Why doesn't my collision work ?
    By Surmulot in forum File Archive
    Replies: 3
    Last Post: 14th January 2008, 12:34 PM
  5. Set Speed, Start, Stop doesn't work
    By Michael_Gummelt in forum Multimedia Fusion 2 - Technical Support
    Replies: 41
    Last Post: 15th July 2006, 07:46 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
  •