Skip to main content
GameDev.net gamedev.net
🔒 Locked

How to let ball go thru curve path?

Started by sambsp Apr 11, 2005 at 4:23 AM 5 replies 1.7k views
Original Post
sambsp
sambsp
I saw those guys developed bowling game can let the ball run thru a curve path (as I thought, give a force will make the game go thru the direction as as the force's, that should be a beeline), who can tell me what's the physics inside detailed (tutorials, links are also apperiated)?
Squirm
Squirm
Is this the ten-pin-bowling with spin or the crown-green-bowling with weighted balls?
sambsp
sambsp
Ummm~~~, I think it's ten-pin-bowling. But what I care is the arithmetic (physics?) to push the ball. What need I add to such a game then my ball can roll thru a curve path to simulate the reality?
Squirm
Squirm
OK, if it's ten pin:

The ball curves because it has spin - it is not rolling in the direction it is travelling. A true physics simulation of this would calculate the speed at which the bottom of the ball is slipping against the floor, work out friction from this, and apply the friction as a force to the ball. If you aren't doing your physics at that level then instead just work out the direction the ball would like to be travelling in, and slowly change it's velocity towards that direction in any way you like (just interpolating it would probably look quite good)
sambsp
sambsp
Dear Squirm, then what's the details (sorry I cannot conclude the formula from what you said, :( )
sambsp
sambsp
As I can think,

1. At the time ball just be released, it will get a velocity whose direction is same as the resulant force;
2. Then the ball will go thru that direction;
3. When ball moves, the friction will come and its direction will be the reverse of Velocity;
4. So, when ball moves (neglect air force), its resulant force is on the same line with its velocity, that won't let the ball run thru a curve path (as I know, object runs curve motion because the resulant force hasn't the same direction as object's velocity).

That's what I thought about such a problem, what was ignored by me?
Eelco
Eelco
Quote:

4. So, when ball moves (neglect air force), its resulant force is on the same line with its velocity, that won't let the ball run thru a curve path (as I know, object runs curve motion because the resulant force hasn't the same direction as object's velocity).

there is a subtitle difference between velocity of the ball and velocity at the contact point.

the velocity at the contact point, which gives rise to friction, may well be pointing in another direction than the velocity of the ball.

the calculate the velocity at the contact point, do this:

vector contactvelocity = linearvelocity + rotationaxis.cross(pointofcontactrelativetoball)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.