User Tag List

Results 1 to 6 of 6

Thread: Can get direction of opponent object when collided with same object?

  1. #1
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)Firefly 3D Module (Steam)
    ASD's Avatar
    Join Date
    Feb 2007
    Location
    Japan
    Posts
    1,884
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Question Can get direction of opponent object when collided with same object?

    How can I get the direction of the opponent object when two identical (another instance) objects collides?

    A with B = get direction of B into A's list
    B with A = get direction of A into B's list

    cf25_b293_1_get_dir_of_opponent_object.zip

  2. #2
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,437
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    The problem is that there's no real order of which one collided with the other
    This order is usually defined by the creation order, not "who started the collision"
    Technically the two collided at the same time.

  3. #3
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,437
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Well, If you don't care who collided first, you can do it this way:
    Instance Collision.mfa

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)

    Join Date
    Feb 2015
    Posts
    52
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi, try this, see if it what you need,
    I added a behaviour to the ball and qualifiers to the ball and list
    i-*ĵ_mod.mfa

  5. #5
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D Module
    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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,437
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    On my example, I added to the list the fixed value of the object that it collided with, but you can get anything you want from that instance and add to the list, for example the direction.

    stiggits , I'm not sure if yours is accurate, I mean, it may just be adding the direction of itself on its own list, or worse, adding to a random list, I believe you can't really do this trick with a object colliding with a qualifier that have the same object... Cause it can't really differentiate the qualifier to the object...

    Here's a simple debugging of your concept, it doesn't work as expected, and using a qualifier or behavior makes no difference.
    Detect who it's colliding with.mfa (This example doesn't work properly, it simply adds itself to its own list, it's just to show what's happening behind stiggits concept)

    Please check my example on the previous comment, it loops through the objects and temporarily store its data so it can scope the opposite list object.

  6. #6
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)Firefly 3D Module (Steam)
    ASD's Avatar
    Join Date
    Feb 2007
    Location
    Japan
    Posts
    1,884
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)
    Thanks guys. For now, I have solved the problem because I found out that if I start ForEach loops when objects collide, only they will be targeted.

    cf25_b293_1_get_direction_of_opponent_object.mfa

Similar Threads

  1. Replies: 2
    Last Post: 23rd May 2018, 04:24 PM
  2. Replies: 1
    Last Post: 19th May 2017, 08:51 AM
  3. Direction of object created by "Launch an object" is wrong
    By sgn15 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th February 2014, 02:49 PM
  4. Application Direction Object
    By Ham in forum Extension Development
    Replies: 8
    Last Post: 17th December 2010, 09:42 PM
  5. how to add 2 to an object's direction
    By Simion32 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st February 2007, 08: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
  •