In real life, would the paddle's position affect the pong ball's movement/location? Like, would it affect the location/movement of the ball if I hit the ball directly in the center of the paddle rather than near the end of the paddle? If so, how could I program this change into Scratch?
Last edited by Sunrise-Moon (2010-09-02 13:26:07)
Offline
It depends if the paddle is straight or not.
Offline
Is the paddle tilted?
Offline
Sunrise-Moon wrote:
Greentabby55 wrote:
Is the paddle tilted?
No.
Then, in real life, the postition of the paddle relative to the ball wouldn't change the ball's course. However, if it is curved or tilted, it will.
Offline
Not unless it was curved/Tilted (Or hit on the edge)
But on most pong games it makes it bounce more to the side you hit it with just to give you more control.
Offline
colorfusion wrote:
Not unless it was curved/Tilted (Or hit on the edge)
But on most pong games it makes it bounce more to the side you hit it with just to give you more control.
Ohk. I'm not sure how I'd do that...
Offline
scmb1 wrote:
Well, if the paddle is moving, that would affect the ball's movement.
You sure?
Offline
scmb1 wrote:
Well, if the paddle is moving, that would affect the ball's movement.
Depends on the friction.
Offline
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((180 - direction) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Last edited by Harakou (2010-09-02 19:44:01)
Offline
Harakou wrote:
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((direction * -1) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Actually, I'm using false velocity/a directional variable, so that probably won't work.
Offline
Harakou wrote:
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((direction * -1) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Correction: [point in direction ( ( (direction) + ( (x position) of paddle) ) * -1)]
Last edited by ScratchReallyROCKS (2010-09-02 19:28:07)
Offline
ScratchReallyROCKS wrote:
Harakou wrote:
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((direction * -1) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Correction: [point in direction ( ( (direction) + ( (x position) of paddle) ) * -1)]
You forgot the x position of the ball.
Offline
Harakou wrote:
ScratchReallyROCKS wrote:
Harakou wrote:
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((direction * -1) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Correction: [point in direction ( ( (direction) + ( (x position) of paddle) ) * -1)]
You forgot the x position of the ball.
*facepalm* I feel stupid
Offline
ScratchReallyROCKS wrote:
scmb1 wrote:
Well, if the paddle is moving, that would affect the ball's movement.
Depends on the friction.
Of course, but with a "real life" paddle, it would affect it. But don't listen to me too much. I'm no physics expert. (Haven't even taken Physics yet.)
Offline
scmb1 wrote:
ScratchReallyROCKS wrote:
scmb1 wrote:
Well, if the paddle is moving, that would affect the ball's movement.
Depends on the friction.
Of course, but with a "real life" paddle, it would affect it. But don't listen to me too much. I'm no physics expert. (Haven't even taken Physics yet.)
If the friction and mass were right, the movement of the paddle probably would affect the movement a bit. I don't think it's significant enough to worry about unless you want to make the game have really nice physics.
Offline
Harakou wrote:
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((direction * -1) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Sunrise-Moon wrote:
Actually, I'm using false velocity/a directional variable, so that probably won't work.
Sure it will. You have to use the directional variable to figure top and side bounces. And the X values are X values regardless of what kind of velocity/movement function you use.
My pong does this except it is horizontal so it uses Y values instead of X.
Locomule's Basic Pong
Offline
Sunrise-Moon wrote:
Harakou wrote:
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((direction * -1) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Actually, I'm using false velocity/a directional variable, so that probably won't work.
Well then that actually makes it much easier! Just reverse the directional variable. For example, if the paddle is on the bottom and the ball hits it, just multiply the y velocity by -1. And if you want, you could change the x velocity a bit based on the paddle's location/movement.
Last edited by Harakou (2010-09-03 19:55:37)
Offline
Harakou wrote:
Sunrise-Moon wrote:
Harakou wrote:
You could have the angle of the bounce adjusted based on its position relative to the paddle's. For example [point in direction ((direction * -1) + (position - x position of paddle))], or something like that. That script probably won't work exactly right, but you get the idea.
Actually, I'm using false velocity/a directional variable, so that probably won't work.
Well then that actually makes it much easier! Just reverse the directional variable. For example, if the paddle is on the bottom and the ball hits it, just multiply the y velocity by -1. And if you want, you could change the x velocity a bit based on the paddle's location/movement.
xD I was already doing the first part . I'll try the second part though
Offline
coolstuff wrote:
Simply adding the velocity of the paddle to that of te paddle will give you a realistic (but not completely perfect) physical illusion.
QFP.
Offline
Sunrise-Moon wrote:
coolstuff wrote:
Simply adding the velocity of the paddle to that of te paddle will give you a realistic (but not completely perfect) physical illusion.
QFP.
Pardon me? I'm familiar with "QFT" but I'm afraid that is a new term for me...
Offline
coolstuff wrote:
Sunrise-Moon wrote:
coolstuff wrote:
Simply adding the velocity of the paddle to that of te paddle will give you a realistic (but not completely perfect) physical illusion.
QFP.
Pardon me? I'm familiar with "QFT" but I'm afraid that is a new term for me...
Quoted for Proof xP. You miswrote that post. Thanks for the help though . I guess I could make the x velocity slowly go down after touching the paddle
Offline