Can Someone Help Me?
Ok I'm pretty good with physics, but I'm wondering, what equations do I use for a dirt bike game? I use formulas like
Acceleration = Force / Mass
But, I need to know how all this fits on a dirt bike. I can plug in the torque values and Weight of the bike and everything, but I want the entire bike to react when the tire spins and stuff. Like in first gear when you hit the gas to hard, the front tire comes off the ground. How do I make this all work. And I will need to work with gravity and friction, with maybe a few other outside influences. Maybe even, center of gravity and things like that. Is there tutorials for dirt bike physics? Much obliged if someone could help me. Thanks
Horny Farmer (Jolly Rancher)
[edited by - VisualB4BigD on May 20, 2002 3:20:06 PM]
VisualB4BigD,
You''re asking for an answer to a very broad problem, and you will not get a complete answer here. But perhaps you will get a few clues.
First, since you seem to be starting with the fundamentals of physics (e.g., acceleration = force/mass is extremely fundamental), then you should probably start out with a simpler dirt bike problem. Don''t worry about the front tire coming off the ground for now, and don''t worry about tire spinning. Don''t worry about a complex friction model. You''ll get lost in a hurry if you try to do everything without understanding more of the basics.
I''d start off with a simple one or two degree-of-freedom "spring-mass" model that doesn''t really treat wheel rotation effects. Really, this spring-mass model would include one or two masses, each with a simple linear spring to represent a shock absorber. The two masses would be tied together with a rigid link. (You could link them with a stiff spring, but I do not suggest this, since it will cause unbelievable problems getting the simulation to be stable.) You can probably build a fairly simple model for acceleration and braking, and that''s almost all you would want to add to your first dirt bike simulation. This could simulate the way the bike rotates onto the front tire upon braking, and rotates onto the back tire upon acceleration.
I realize that a picture would help here, but I don''t have time to create a picture, and I don''t have a place to host a picture.
You might want to look in the forum archives for race car dynamics. You should find some discussion of similar simple low-degree-of-freedom "spring-mass" models in previous threads.
To get started with the spring-mass system, look at Jeff Lander''s articles at:
http://www.gamasutra.com/php-bin/article_display.php?category=7
That won''t give you a complete picture of dirt bike or vehicle physics, but it will get you started on spring-mass systems, particularly his "Collision Response: Bouncy, Trouncy, Fun" article.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
You''re asking for an answer to a very broad problem, and you will not get a complete answer here. But perhaps you will get a few clues.
First, since you seem to be starting with the fundamentals of physics (e.g., acceleration = force/mass is extremely fundamental), then you should probably start out with a simpler dirt bike problem. Don''t worry about the front tire coming off the ground for now, and don''t worry about tire spinning. Don''t worry about a complex friction model. You''ll get lost in a hurry if you try to do everything without understanding more of the basics.
I''d start off with a simple one or two degree-of-freedom "spring-mass" model that doesn''t really treat wheel rotation effects. Really, this spring-mass model would include one or two masses, each with a simple linear spring to represent a shock absorber. The two masses would be tied together with a rigid link. (You could link them with a stiff spring, but I do not suggest this, since it will cause unbelievable problems getting the simulation to be stable.) You can probably build a fairly simple model for acceleration and braking, and that''s almost all you would want to add to your first dirt bike simulation. This could simulate the way the bike rotates onto the front tire upon braking, and rotates onto the back tire upon acceleration.
I realize that a picture would help here, but I don''t have time to create a picture, and I don''t have a place to host a picture.
You might want to look in the forum archives for race car dynamics. You should find some discussion of similar simple low-degree-of-freedom "spring-mass" models in previous threads.
To get started with the spring-mass system, look at Jeff Lander''s articles at:
http://www.gamasutra.com/php-bin/article_display.php?category=7
That won''t give you a complete picture of dirt bike or vehicle physics, but it will get you started on spring-mass systems, particularly his "Collision Response: Bouncy, Trouncy, Fun" article.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Ok, I do understand alot of physics, I just gave that equation as an example. I have read all of those articles. I have read the physics of racing series. But, what I need I guess I will just have to figure out myself (like I always do). Thanx for the help anyways. I relize that you were trying help. Until Next Time.
Horny Farmer (Jolly Rancher)
Horny Farmer (Jolly Rancher)
I probably misinterpreted your post a bit, based on that one simple equation, and I apologize for that.
Wish I could have pointed you to something that covers dirt bike physics, but I''m not aware of anything. I still suggest the forum archives, since race car physics has been covered and that might very well provide some useful ideas.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
Wish I could have pointed you to something that covers dirt bike physics, but I''m not aware of anything. I still suggest the forum archives, since race car physics has been covered and that might very well provide some useful ideas.
Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.
I think you will just need to code "resistances".
As in, when you give too much throttle in first gear, what happens is that you put a lot of forward force on the bike, and that force crosses threshold that is for "lifting the front wheel".
Now, to lift the front wheel, you need a certain amount of force that moves it upward. This has to do with momentum as well. Basicly you got a force of ((weight-of-bike) * (distance-from-middle-to-rear-tire)) working on your front wheel. As soon as you got more upward force on your front wheel, you take off.
Next to determine, is *what* gives the upward force. I guess this has partially to do with the mass of the bike accelerating faster then the driver at first, 'causing the driver to give a slight backwards force on the steer (mass is slow, don't know the exact formula). This backward force is situated at the steer, thus above the "rotating point" on the back wheel, thus this force partially works upwards for the front wheel.
[EDIT:] I know I only used 2 forces here, but there are probably a lot more forces at work. It's just in my humble experience, that it is best to only use Gravity, and a single, counteracting force, that depends on the force on the bike, and it's current speed.
I got a simple image here (I know, it looks more like a bicycle, but you get the idea )
Now, basicly, you try to determine the rotational forces on the back wheel. As you can see, you actually need to calculate the force that works on a 90-degree corner with the line that goes through the turning-point. You can then simply see if that force will try to turn the bike at that point clockwise, or counterclockwise.
In this case, the weight of the bike causes a counter-clockwise movement, and the force on the biker causes a clockwise movement. Since the front wheel rests on the ground, the weight of the bike does not cause any actual movement. It's momentum (Fz' * r) is the treshold against "lifting the bike". (r is the distance between where the force works, and where the rotating point is).
Now, you also got the clockwise force. That force increases when the forward force on the bike jumps up fast, and becomes smaller once the bike is getting up to speed. When this force is big, it means that the clockwise force (in this case, (Fdr' * r), r again being the distance between where the force works and the rotation point) is big, and once is exceeds the counterclockwise force, your bike's front wheel lifts
Summary: calculate all the forces that work on the rotational point of your bike, add/substract them all, and then see what way the point turns: clockwise or counterclockwise ^_^
EDIT: I know that normally there are more then 2 forces at work, but in my humble experience, it's good enough to only use 2: the counterclockwise Gravity force, and a clockwise force that depends on the force on the bike, and the current speed/acceleration of the bike, positioned somewhere around the steering wheel. This gives me the best results.
[edited by - Ronin_54 on May 24, 2002 9:12:14 AM]
As in, when you give too much throttle in first gear, what happens is that you put a lot of forward force on the bike, and that force crosses threshold that is for "lifting the front wheel".
Now, to lift the front wheel, you need a certain amount of force that moves it upward. This has to do with momentum as well. Basicly you got a force of ((weight-of-bike) * (distance-from-middle-to-rear-tire)) working on your front wheel. As soon as you got more upward force on your front wheel, you take off.
Next to determine, is *what* gives the upward force. I guess this has partially to do with the mass of the bike accelerating faster then the driver at first, 'causing the driver to give a slight backwards force on the steer (mass is slow, don't know the exact formula). This backward force is situated at the steer, thus above the "rotating point" on the back wheel, thus this force partially works upwards for the front wheel.
[EDIT:] I know I only used 2 forces here, but there are probably a lot more forces at work. It's just in my humble experience, that it is best to only use Gravity, and a single, counteracting force, that depends on the force on the bike, and it's current speed.
I got a simple image here (I know, it looks more like a bicycle, but you get the idea )
Now, basicly, you try to determine the rotational forces on the back wheel. As you can see, you actually need to calculate the force that works on a 90-degree corner with the line that goes through the turning-point. You can then simply see if that force will try to turn the bike at that point clockwise, or counterclockwise.
In this case, the weight of the bike causes a counter-clockwise movement, and the force on the biker causes a clockwise movement. Since the front wheel rests on the ground, the weight of the bike does not cause any actual movement. It's momentum (Fz' * r) is the treshold against "lifting the bike". (r is the distance between where the force works, and where the rotating point is).
Now, you also got the clockwise force. That force increases when the forward force on the bike jumps up fast, and becomes smaller once the bike is getting up to speed. When this force is big, it means that the clockwise force (in this case, (Fdr' * r), r again being the distance between where the force works and the rotation point) is big, and once is exceeds the counterclockwise force, your bike's front wheel lifts
Summary: calculate all the forces that work on the rotational point of your bike, add/substract them all, and then see what way the point turns: clockwise or counterclockwise ^_^
EDIT: I know that normally there are more then 2 forces at work, but in my humble experience, it's good enough to only use 2: the counterclockwise Gravity force, and a clockwise force that depends on the force on the bike, and the current speed/acceleration of the bike, positioned somewhere around the steering wheel. This gives me the best results.
[edited by - Ronin_54 on May 24, 2002 9:12:14 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement