User Tag List

Results 1 to 3 of 3

Thread: Question: Collision detection for overlapping objects

  1. #1
    No Products Registered

    Join Date
    Dec 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question: Collision detection for overlapping objects

    I have a frame with multiple actives that represent shooting targets. Targets may partially overlap each other. When 'bullet hit' is detected - I'm testing for bullet overlapping a target - I calculate the score based on which target was hit. Brown targets are scored depending on which target area was hit. White targets being shot incur penalty.
    TargetOverlap.jpg
    With targets overlapping, the event sequence in the event editor affects how the score will be calculated. For example, if a white target is partially blocked by a brown one, and the shot hits brown target first, a penalty is being assessed, which is incorrect.

    Is there a simple way to distinguish between target objects front-to-back, to determine which target was hit first? Does the runtime engine evaluate the 'object overlaps' condition in a particular order when more than two objects are overlapping?

    I'm hoping to stay away from creating multiple layers here because I'm still a beginner when it comes to MMF2 development.

  2. #2
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using the select object.

  3. #3
    No Products Registered

    Join Date
    Dec 2011
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Corlen View Post
    Try using the select object.
    Totally awesome, thank you! It also helped me tighten my code by storing the score value in target's attribute, and simply checking for the top-most of 'Targets' qualifier. And I don't need the fastloop I was using. Thanks again!

Similar Threads

  1. Collision Detection with Backdrops Overlapping Each Other
    By stevenart1988 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 11th July 2013, 01:39 PM
  2. Collision detection of backdrop objects not working outside of original frame.
    By butterfingers in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 16th August 2012, 09:50 AM
  3. ["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
  4. Advanced overlapping detection ?
    By donmanolo in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 31st August 2011, 10:37 PM
  5. Bug with overlapping collision detection?
    By mobichan in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 2nd April 2010, 11:16 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
  •