I'm just wondering how to go about this in box2d. (I'm considering porting a pinball engine I have in AS3 to box2d).
The question/problem:
I want to create a scenario where a floor preserves all velocity but simply affects the direction of a ball travelling along it.
(no bounce, no friction, no gravity).
Imagine a perfect half-pipe (half-circle) with a ball on the top-left side. (on the edge). I want to give the ball a velocity of (0,10) (that is, 10 in the y axis).
The ball should then travel along the curve of the half-pipe and leave the top-right side with a velocity of (0,-10). The -10 would occur because of the ball following the half pipes curve, but the total velocity in the system has not changed, only the direction.
Is it possible to do this? How?
Cheers! 🙂
The question/problem:
I want to create a scenario where a floor preserves all velocity but simply affects the direction of a ball travelling along it.
(no bounce, no friction, no gravity).
Imagine a perfect half-pipe (half-circle) with a ball on the top-left side. (on the edge). I want to give the ball a velocity of (0,10) (that is, 10 in the y axis).
The ball should then travel along the curve of the half-pipe and leave the top-right side with a velocity of (0,-10). The -10 would occur because of the ball following the half pipes curve, but the total velocity in the system has not changed, only the direction.
Is it possible to do this? How?
Cheers! 🙂