Search code examples
actionscript-3collision-detectionphysicscollision

Actionscript 3 Collision detection


I know there are some methods you can use like hittestPoint and so on, but I want to see where my movieclip colliedes with another another movieclip. Any other methods I can use?

by any chance does somebody know some a good introduction to game physics? Im asking because I coded a small engine and pretty much the whole code is spagetti code thats why I would like to know how you can setup something like this properly


Solution

  • Start by looking at the physics libraries...

    you have the popular choice: box2d ( http://box2dflash.sourceforge.net/ ) or nape ( https://github.com/deltaluca/nape )

    both of these include demos, which are a good place to start as most are meant for games

    if you're doing 3d, then jiglib is a good place to look ( http://www.jiglibflash.com/ )