# Pong Hit detection: Any ideas?

**URL:** https://forum.kirupa.com/t/pong-hit-detection-any-ideas/67452
**Category:** Uncategorized
**Created:** [October 16, 2004, 3:51am UTC](https://forum.kirupa.com/t/pong-hit-detection-any-ideas/67452 "2004-10-16T03:51:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chockybickyman](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@chockybickyman](https://forum.kirupa.com/u/chockybickyman)
#### Post date: [October 16, 2004, 3:51am UTC](https://forum.kirupa.com/t/pong-hit-detection-any-ideas/67452/1 "2004-10-16T03:51:26Z")

</div>

[url=“[http://www.danieltodd.com/](http://www.danieltodd.com/)”]

**Hi there,**

**I am making a pong game where the game is played on the x axis.**

\*\* I have a code (displayed below) that is a simple hit detection:\*\*

//paddle1 hit ball  
if (\_root.ball.hitTest(\_root.paddle1)) {  
\_root.xspeed = -\_root.xspeed;  
\_root.audio.gotoAndPlay(“metal\_hit”);  
}

**What i want to do with this code, is a hit detection where when the ball hits the paddle on a certain part of the paddle on the y axis and bounces on a sharper or straighter angle depending on where the ball hits the paddle. (EG. very tip of the paddle bounces off sharper, middle of paddle bounces of straighter.**

**Im sure there is some examples of code out there for this kind of technique, but i have had no luck so far.**

**Can any one out there please help me???**

**Cheers**  
**Peter.D**
