A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [MX] Hit Test??? Wierd One...

  1. #1
    Flash Intermediate XenElement's Avatar
    Join Date
    Sep 2008
    Location
    At my computer
    Posts
    196

    Question [MX] Hit Test??? Wierd One...

    I'm trying to do a hit test on a movie clip, but it's animated, and the sides are constantly changing. It's sort of an off circle, like a blob. I cant have a rectangular hit test because, well, its not rectangular. >.<

    Please help, any thing is appriciated!
    In the process of designing a quirky little game engine called gulp. Check out it's progress below: @ my blog.

    ---

    Check out my blog at XenElement.com

  2. #2
    President PhobiK's Avatar
    Join Date
    Jan 2005
    Location
    Guatemala
    Posts
    918
    Why not doing an invisible inner movie clip with wich the real collision is checked on?
    This is MC. His _parents sent him to stop() by the super market to buy some _root beer if he wanted to gotoAndPlay() with his friends at the park later.

    This is my Blog!... The gaming Process
    Please check out my site: Giddel Creations

  3. #3
    Flash Intermediate XenElement's Avatar
    Join Date
    Sep 2008
    Location
    At my computer
    Posts
    196
    sounds good. How exactly would I do That? I got a mc called collision in a circle shape, but now what?
    In the process of designing a quirky little game engine called gulp. Check out it's progress below: @ my blog.

    ---

    Check out my blog at XenElement.com

  4. #4
    President PhobiK's Avatar
    Join Date
    Jan 2005
    Location
    Guatemala
    Posts
    918
    place the "collision" mc inside the movie clip you want, set its _visible to false and then instead of if (this.hitTest(... you go if(this.collision.hitTest.
    This is MC. His _parents sent him to stop() by the super market to buy some _root beer if he wanted to gotoAndPlay() with his friends at the park later.

    This is my Blog!... The gaming Process
    Please check out my site: Giddel Creations

  5. #5
    M.D. mr_malee's Avatar
    Join Date
    Dec 2002
    Location
    Shelter
    Posts
    4,139
    the same problem will happen, just with a different movieclip.

    you want shape based hitTest:

    if(blob.hitTest(point.x, point.y, true)){

    trace("a point hit the shape");
    }

    awaits response "yeah cool, how do I get another shape to hit the blob"
    lather yourself up with soap - soap arcade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center