hey guys, i have this code on my wall for the hitTest with a car… However it doesnt work unless it is on my car mc. It works fine on the car mc, though it need to be on the wall.
Its got me stumped good. Any ideas?
onClipEvent (enterFrame) {
_root.speed *= .98;
x = Math.sin(_root.car._rotation*(Math.PI/180))*_root.speed;
y = Math.cos(_root.car._rotation*(Math.PI/180))*_root.speed*-1;
**if (!_root.car.hitTest(_x+x, _y+y, true)) {**
_x += x*-1;
_y += y*-1;
} else {
_root.speed *= -.6;
}
}