Game Development Reference
In-Depth Information
about the center of mass of the car, causing the entire vehicle to rotate. You have probably seen
this effect in watching a car take a high-speed turn where the back end of the car slides outward
or “fishtails.”
The simplest way to model high-speed turns is to compute the lateral force, F lateral , on the
car as being equal to the difference between the centripetal force on the car and the frictional
force acting on the tires.
2
mv
F
=−
μ
mg
cos
θ
(8.41)
lateral
k
r
c
The angle q is the angle of any slope that the car might be driving on. In Equation (8.41), a
positive lateral force is one acting outwards. Because the frictional force will never exceed the
centripetal force (the car won't be sucked into the center of the turn circle), the lateral force
term will always be greater than or equal to zero.
Equation (8.41) provides a rough approximation to lateral force, but it doesn't model
effects such as fishtailing or spinouts when a car tries to take a curve too fast. To get the more
sophisticated high-speed turning effects requires that the lateral force be evaluated for each
tire as it goes around the curve. This analysis is pretty complicated, involving concepts such as
wheel slip angles, and is beyond the scope of this topic.
Modeling Car Crashes
As we all know, cars sometimes run into things. In real life, hitting something with your car is
generally a bad thing to have happen to you. In car simulations, sometimes it seems like half
the fun is running into or bouncing off of other objects. We learned about the basics of collision
modeling in Chapter 6, and many of the same concepts can be applied to cars. Cars are not
solid blocks of metal. When they hit something, unless it is at very low speeds, the body of the
car will crumple as a result of the collision. The collision is inelastic because some of the kinetic
energy of the car and whatever it hits will be converted into work that is performed in
damaging the car.
In Chapter 6, equations were presented to compute the post-collision velocities of two
objects in the direction of the line of action of the collision. Those expressions are repeated
here in Equations (8.42a) and (8.42b). The post-collision velocities, v
2 , are functions of
the masses of the two objects, m 1 and m 2 , the pre-collision velocities, v 1 and v 2 , and the coeffi-
cient of restitution, e . One of the objects will be the car. The other object could be almost
anything—another car, a tree, a fast food restaurant, and so on.
1 and v
(
)
1
+
em
mem
2
v
′ =
1
2
v
+
v
(8.42a)
1
1
2
mm
+
mm
+
1
2
1
2
(
)
1
+
em
mem
=
1
v
v
+
2
1
v
(8.42b)
2
1
2
mm
+
mm
+
1
2
1
2
If any part of the car is deformed during the collision, then the collision is inelastic, and the
coefficient of restitution will be less than one. As a reminder, a more extensive discussion of
elastic and inelastic collision can be found in Chapter 6. An extreme case for the car collision
would be if the collision were completely inelastic, meaning that the coefficient of restitution
 
Search WWH ::




Custom Search