# Hittesting. special rules?

**URL:** <https://forum.kirupa.com/t/hittesting-special-rules/186717>\
**Category:** Uncategorized\
**Created:** [April 24, 2006, 1:08am UTC](https://forum.kirupa.com/t/hittesting-special-rules/186717 "2006-04-24T01:08:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![willgoldstone7](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/willgoldstone7/32/2251_2.png) [@willgoldstone7](https://forum.kirupa.com/u/willgoldstone7)\
**Post date:** [April 24, 2006, 1:08am UTC](https://forum.kirupa.com/t/hittesting-special-rules/186717/1 "2006-04-24T01:08:37Z")

</div>

are there any special rules regarding hittesting?  
im using this code here and its jus not working at all:  
var speed:Number = 0;  
var angle:Number = 0;  
var angleFish:Number = 0;  
fish\_mc.onEnterFrame = function() {  
radian = Math.PI/180_angle;  
this.\_x += (speed_Math.cos(radian));  
this.\_y += (speed_Math.sin(radian));  
this.\_rotation = angle;  
if (pond\_mc.hitTest(this.\_x, this.\_y, true)) {  
speed = speed;  
} else {  
speed = 0;  
speed -= 1;  
}  
if (Key.isDown(Key.RIGHT)) {  
angleFish += 10;  
} else if (Key.isDown(Key.LEFT)) {  
angleFish -= 10;  
}  
if (Key.isDown(Key.UP)) {  
speed += 1;  
} else if (Key.isDown(Key.DOWN)) {  
speed -= 1;  
}  
speed = speed_0.95;  
angle += angleFish;  
angleFish = 0;  
};  
im starting to get quite irritated so any help would be much appreciated,  
cheers

---

<div class="post-metadata">

**Author:** ![Mirandir](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@Mirandir](https://forum.kirupa.com/u/Mirandir)\
**Post date:** [April 24, 2006, 5:43am UTC](https://forum.kirupa.com/t/hittesting-special-rules/186717/2 "2006-04-24T05:43:07Z")

</div>

Note that that hitTest will only check if fish\_mc’s registration point is colliding with pond\_mc. If you wan’t to do a true shape-to-shape hitTest you’ll need to check against more points on fish\_mc rather than just it’s registration point.

/Mirandir

---

<div class="post-metadata">

**Author:** ![willgoldstone7](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/willgoldstone7/32/2251_2.png) [@willgoldstone7](https://forum.kirupa.com/u/willgoldstone7)\
**Post date:** [April 24, 2006, 11:04am UTC](https://forum.kirupa.com/t/hittesting-special-rules/186717/3 "2006-04-24T11:04:19Z")

</div>

at the moment the fish is sitting over the pond so i should hope it knows the registration point is there. how would i get it to check more points on the fish out of interest?
