User Tag List

Results 1 to 9 of 9

Thread: visible collision boxes?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    visible collision boxes?

    Is it possible to display the non-fine collision rectangles that MMF uses? Also, are there any resources for making radial collision checks (ie circular collision)?

    Mobichan

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: visible collision boxes?

    non-fine collision boxes are just the boundaries of the object, including any transparent borders

  3. #3
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: visible collision boxes?

    you are able to read the extents of objects in the event editor so making a 'Hit Box'(3d term) would certainly be possible.

  4. #4
    Clickteam Clickteam
    Olivier's Avatar
    Join Date
    Jun 2006
    Posts
    3,000
    Mentioned
    9 Post(s)
    Tagged
    1 Thread(s)

    Re: visible collision boxes?

    In the object's properties under Ink Effect, if you uncheck Transparent MMF will display the transparent color as opaque. Then you'll see the object's collision box which is used by MMF when "Use fine detection" is unchecked.
    As for radial collision checks, I'd create a separate round shaped active object which would act like the collision box (not really a box in this case).

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: visible collision boxes?

    Thanks for the tip on the ink effect. I'll give it a go.

    I already use circular object in some cases, but it is still a pixel collision check. I am assuming that the pixel collision in MMF2 is the most processor intensive method. Since radial collision is the least expensive method (in general programming), I was just curious if someone had explored that in MMF2.

  6. #6
    No Products Registered

    Join Date
    Apr 2008
    Location
    Haven
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: visible collision boxes?

    You could probably code it using the .NET/C# extension. The problem is it would be an evaluated event rather than a true event, and might slow the engine down even more.

    Basically, turn off fine collision detection for all square or rectangular actives (that is, those who's graphics and perfect or near perfect squares or rectangles), and for any actives that you do not check collisions for. You only need the pixel-fine checks on round or irregularly shaped things that you care about the collisions for.

  7. #7
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: visible collision boxes?

    The Reason radial collisions are quicker is because there is no actual pixel testing... the positions are evaluated into distance and if the distance is smaller then a set number the collision is detected.

    however this is slow until it is optimized, for example if we use the generic trig for distance;
    D=sqr(x2-x1) pow 2 + (y2-y1) pow 2)

    you can see that if the distance calculation took place in the lower right hand of a frame the computer would have to evaluate the square root of a massive number and that is where things slow down...

    you can counteract this with things like x1=max(x1,x2)-min(x1,x2) x2=0

    It should also be noted that you can remove the sqr argument completely as long as your radius is not to dynamic for example if your player always had a radial collision size of 10 you could remove the sqr function and simply compare your distance to 10'2 (100).


    Srry for writing an SA on your post, but you should be set for life as far as radial collisions go :grin:

  8. #8
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: visible collision boxes?

    Thanks. I'll give it a try.

    I also saw in the wiki that if 2 types of collision are present (fine collision and box collision) that the fine collision will be used on both objects. Is that always the case as long as one of the objects being compared is set to fine collision? Or is it based on the object doing the testing (ie, the first object in the argument)?

    What I am trying to determine is if having ANY objects that use fine collision will negate the optimized use of the other types of collision. Meaning, is it pointless to mix collision types, since having fine collision on even one object will force all box collison to use fine anyway? ...exhale.

    Mobichan

  9. #9
    Clicker Multimedia Fusion 2
    SEELE's Avatar
    Join Date
    Jul 2007
    Location
    Terra australis incognito
    Posts
    1,916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: visible collision boxes?

    No.

Similar Threads

  1. Collision outside visible frame
    By Fanotherpg in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th April 2012, 11:46 PM
  2. [BUG] Edit box isn't visible
    By qenio in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 6th August 2011, 01:04 PM
  3. Collision Boxes
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th May 2011, 01:39 PM
  4. help: custom collision boxes
    By scdlsam in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 5th May 2008, 09:12 PM
  5. Collision boxes
    By Nickydude in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st March 2007, 05:39 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
  •