User Tag List

Results 1 to 4 of 4

Thread: creating object C where A and B meet

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2006
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    creating object C where A and B meet

    Is it possible to create an active object at the point--or average of coordinates--where two other objects meet? I'm guessing you can't, but I figured I'd ask anyway.

  2. #2
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Nov 2006
    Posts
    696
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating object C where A and B meet

    Would this work for what you are doing?:


    *Compare two general values> X(activeA) = X(avtiveB)
    +Compare two general values> Y(activeA) = Y(activeB)
    +Special> Run this event once

    Create object activeC relative to (0,0) of active A

    Hope this helped!

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2006
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating object C where A and B meet

    I don't think so, because I'm not trying to create the object at (0,0) relative to active object A. I'm trying to create it where the two objects meet. The problem with that is, if the objects overlap at more than one point, you'd have to find a way to create the third object at the center or average of the coordinates. That's why I don't think this is possible.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module

    Join Date
    Jun 2006
    Location
    Melbourne, Australia
    Posts
    765
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: creating object C where A and B meet

    When the two object collide you need to do a mathematical calculation using fastloops.

    Here is the basic logic for two boxes colliding and maybe overlapping.

    Collision event,

    Get x,y of 1
    get width and height of 1

    do the same for the second object.

    Now you need to find the area of the collision or overlap in terms of x,y and width and height. Since you have two areas you subtract from each other.

    Then you are left with a box. To find the centre of the box you need to use a bit of trig. but an easier way is to work out the co-ordinates of each corner and find the halfway point. then add the horizontal and vertical halfway point to the value. You are now presented with an x y value which is the centre of the collision box.

    For other shapes there are a number of algorithms you could use depending on what the situation and requirement where.

    Hope that is of some help.

Similar Threads

  1. Checking that all instances meet a condition
    By Keith in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd August 2011, 01:07 PM
  2. ISO Creating Object
    By Nerdy Nerd in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 21st May 2010, 09:40 PM
  3. How do I count how many actives meet a condition?
    By BREK in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 29th April 2010, 01:40 PM
  4. Creating an object
    By KiteRyagara in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 22nd January 2008, 09:33 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
  •