For the physics engine I’m developing, (Flash MX) I need it to be able to handle particles moving quickly enough that hitTest() would be impractical because of clipping issues. I’m representing particle movement through vectors, and in each frame I update the position of particles based on their physics vector. I’m trying to design a collision detection system that detects whether the line representing the particle’s vector intersects a movie clip, and where on that line it does.
This way, I can figure out exactly if and where a particle will collide on the next frame without having to worry about it clipping. Problem is, I can’t exactly tell the engine to parse every point along the line and check for collisions using hitTest; that would be too processor-intensive and would kill my framerate (I’m shooting for 24 or 30 fps.) Any good ways to tell if a line intersects an irregularly-shaped movie clip on the fly? Thanks a LOT.
Really. I’ve been working on this without success for months…