A Flash Developer Resource Site

Results 1 to 20 of 214

Thread: The elusive hitTest explained

Hybrid View

  1. #1
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    For this there are two fixes:

    Define the walls as sets of points (a bent line) and the balls movement as a vector. Then just test the vector against the line(s). This requires a good bit of algebra knowledge, but can be a better system in the long run for collisions (just find the gradient of the line) and mass hitTesting.

    OR

    Do a set of checks, ie. one for every 10px the ball will travel that frame.

  2. #2
    Junior Member
    Join Date
    Sep 2004
    Location
    Scotland
    Posts
    20
    I have tried the
    Code:
    if(this.hitTest(_x, _y, true)){
    //do something
    }
    but if dosen't work.

    If someone can modify the attached fla to work I much appreciate it.
    Attached Files Attached Files
    Foo-Wing Li

    Co-Director
    DGFX Designs LLP


    www.dgfxdesigns.com

    Website Templates

  3. #3
    Member
    Join Date
    May 2008
    Posts
    48

    map wht

    i got the source but still coldnt figure out the root map thing

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