I’m making this quick pong game and using hitTestObject to check for the collision. Shouldn’t be a problem, since everything is rectangle anyway. Each ball in the vector is checking to see if it’s colliding with the paddle every frame. Why does each ball not trigger the collision until it gets about half way through it? I can’t call a function more frequently than enter_frame does, or can I? I just seems like it’s not updating fast enough or something.
if (ball[i].hitTestObject(paddle)){
// Flip
ball[i] *= -1;
}
Quick pic of it:

I would assume it’s because that’s where the ball is when you run the hit test, as it’s only checking momentary locations instead of a smooth line of movement. In other words, if on one frame the edge of the ball is 5px away from the paddle, the hit test will be false. If the ball then moves 8px on the next frame, the hit test will be true, but the ball edge will be 3px inside the paddle.
When I have a simple flat edge like this to test, I tend to do something along these lines (given a ball with
speedYandradiusvariables, andpaddle.y== the leading edge of the paddle):