User Tag List

Results 1 to 8 of 8

Thread: Exact position of collision

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    927
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Exact position of collision

    Hi,

    I'm making a app to the university. In it, I need create a mirror image (the mirror rotates in origin of cartesian plane and a reflected image appears) in other side.
    Well, I'm using actives for simulate the rotation, but I need calculate the distance between the real image and the exact point where the two actives intersect (see the image attached) to discover the distance between the mirror and the reflected image.
    Anybody knows how to do make it?
    [img:center]http://img26.imageshack.us/img26/2496/61380718.jpg[/img]

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: Exact position of collision

    Can you not use the X,Y of each object? Where you set the hot spot will be the X,Y positions.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Exact position of collision

    I'm not sure I understand the problem completely. Are you trying to find the distance between a line and a point?

    This might help:
    http://www.ahristov.com/tutorial/geometry-games/point-line-distance.html

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    927
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Exact position of collision

    yes, but the problem is retrieve the point where two active collides. I need knows the coordinates (in relation of your body ) where it collides with another object

  5. #5
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    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)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    Phi's Avatar
    Join Date
    Jan 2010
    Location
    England
    Posts
    1,964
    Mentioned
    25 Post(s)
    Tagged
    0 Thread(s)

    Re: Exact position of collision

    Well, Pharanygitis made the Advanced Collision object, which should do that, but it's Flash-only. Maybe someone could convert it?

  6. #6
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Exact position of collision

    The way collisions are optimized, they could not return 'exact collision positions'. If I guess correctly how it was done, it will first cull the pixels that are not in the same X/Y bounds, then iterate over the remaining ones, from topleft to bottomright one line or column at a time, and when it hits a collision, it will stop and not need to keep checking (I hope this is how its done).

    If thats the case, you'd always get the first detected position of collision, not the average or 'exact' position, considering the frame-based r/e/p loop. So thats not feasible.

    However, doing collisions like these can be found through doing loops of collision detection of your own. The reflection over a line can only be given if you know not just the position of collision, but also the angle of incidence, which needs the normal angle of the bitmap. If thats what you need, I have an article written about finding that same angle on a 2d collision map, over here;
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=207486#Post2074 86

    For the matter of finding the position of the collision itself, it is usually best to imagine the colliding object as a single point, and check the collision mask, or a seperate detector object, on positions in a loop in the angle of your movement, to see when it collides and where.

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Re: Exact position of collision

    As far as I can tell, the problem has nothing at all to do with collisions.
    It seems like you're just trying to do something like this:
    https://skydrive.live.com/self.aspx/Public/Mirror.mfa?cid=b1e7ee094271bbda&sc=documents

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    927
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Exact position of collision

    Thanks, Pixelthief. Your explanation help me in other project In this case, the example made by MuddyMole is exactly what I need. I need make only some adaptations. Thanks a lot, MuddyMole!

Similar Threads

  1. Can you release an app an exact date?
    By Outcast in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 10th August 2013, 03:37 PM
  2. Collision with exact center?
    By Pineapple in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st April 2011, 08:09 PM
  3. Find String exact
    By dascribe in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 28th May 2010, 09:43 PM
  4. Exact Following Tail Help
    By Docilemouse in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd September 2009, 03:51 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
  •