Hi folks!
I have had some problems with creating a bouncing ball game, since I cant use angled/skewed surfaces to bounce off of (stupid flash bounding boxes aint forming like the shape of the bouncer… hence the ball would only jump upwards, never in a direction).
Now i worked around the bounding box problem, shown here:
targets = new Array();
targets[0] = block_mc_2;
targets[1] = block_mc_3;
targets[2] = block_mc_4;
function checkHit() {
for(i=0; i<targets.length; i++) {
if(targets*.hitTest((this._x + this._width/2), (this._y + this._height), true)) {
trace("hit");
} else {
trace("no hit");
}
}
Now this is all cool, but I cant figure out how to make the ball bounce off of it now when they collide. Any ideas?
Thanks in advance!