# Bouncing without hittest

**URL:** <https://forum.kirupa.com/t/bouncing-without-hittest/230167>\
**Category:** Uncategorized\
**Created:** [June 23, 2007, 11:18am UTC](https://forum.kirupa.com/t/bouncing-without-hittest/230167 "2007-06-23T11:18:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gora](https://avatars.discourse-cdn.com/v4/letter/g/ba8739/32.png) [@gora](https://forum.kirupa.com/u/gora)\
**Post date:** [June 23, 2007, 11:18am UTC](https://forum.kirupa.com/t/bouncing-without-hittest/230167/1 "2007-06-23T11:18:12Z")

</div>

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:

```php

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!
