Clicky

How do i simulate the physics of a motorbike riding over a round object small then the wheel.
For a computer game.

I want the motorbike to ride over the rock and make it look realistic (doesnt have to be exact) the rider can stay fixed for now and not move.

I will use vb.net or c# but i need the mathematics first

eg
http://www.playmotorbikegames.com/games/Beach_Bike.html

asked 09/16/2010 09:46

jagguy's gravatar image

jagguy ♦♦


6 Answers:
Here is a skateboard of length, L, ready to hit a small round object as it moves to the right.

<------- L ----->
_____________
O                   Oo

The board has a velocity, V, to the right.

Since the little o is small, let's not worry about the fact that some of the kinetic energy has been converted into potential energy, so let's keep the velocity magnitude constant. But the direction has changed.
                 .../O
O                   o

If h is the height of the small o, then the angle ß formed by the back wheel to the front can be found by:
   sin ß = h/L

Now that you have ß, you have the new direction of the motorcycle moving up in the air. Then its center of gravity follows a parabola just as throwing a ball follows a parabola due to gravity.

Here are some useful equations of motion:
     http://www.collegeboard.com/prod_downloads/ap/students/physics/info_equation_tables_2002.pdf
link
phoffric's gravatar image

phoffric

The angle (theta) that a line through the hubs of the two wheels of the motorcycle will make with the flat ground will be given by
tan (theta) = h/L       where h is the diameter of the rock and L is the distance between the wheel hubs.
(This is a slight approximation but will be realistic enough.)
link
aburr's gravatar image

aburr

Here is another set of links where you can even plug in numbers to solve for the equations. This way you will be able to check your results.
   http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html#tra4
   http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html#tra5
   http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html#tra6
   
Here is where your angle ß comes into play:
   http://hyperphysics.phy-astr.gsu.edu/hbase/traj.html#tra13
   http://hyperphysics.phy-astr.gsu.edu/hbase/trajs.html#tra15

I looked at a motorcycle game in your other question. Remember this. Even if the rider shifts his weight, that will change the inclination of the motorcycle; but the combined center of gravity of both the motorcycle and the rider will remain in a fixed parabola. (This assumes no wind resistance, and no jet packs.)
link
phoffric's gravatar image

phoffric

re: sin ß = h/L

If, as you said, h is fairly small, then h/L is very small. In that case a reasonable approximation is that:
    ß = h/L
Note that  ß in this formula is in radians. To convert from radians to degrees (if you need this for debugging or are just more comfortable in degrees) here is the formula:
              degrees =  ß * 180/ PI                     where PI ~= 3.14159

Given ß, then the path the Center of Mass (CM) takes at impact with the little o is:
    V = (Vx, Vy) = (V cos ß, V sin ß)

So in your motorcycle trajectory, this V is actually your initial velocity, Vo, whose direction is at angle ß.
link
phoffric's gravatar image

phoffric

ok thanks for the replies. I will post another question about jumps and look at what is posted here.
link
jagguy's gravatar image

jagguy

Just make something that looks good.  If you are serious about wanting it to be realistic then you might as well integrate a physics engine and do it properly, modeling shock absorbers, the cushioning of the rider's legs, etc.
link
NovaDenizen's gravatar image

NovaDenizen

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

Asked: 09/16/2010 09:46

Seen: 331 times

Last updated: 09/22/2010 12:36