Game Development Reference
In-Depth Information
countersteering is probably more as a visual effect than anything else. When the motorcycle
riders in your games make a turn, have the motorcycle lean into the turn.
Adding Sophisticated Effects to the Car or
Motorcycle Models
This chapter has covered the basics of modeling the motion of cars and motorcycles. As you
might imagine, certain sophisticated physical effects that govern the motion of cars and motor-
cycles were not covered in detail. This chapter already mentioned that a true representation of
the lateral force experienced by a car during a turn involves analyzing the lateral force experienced
by each of the four wheels. Another effect that happens during a turn is that weight is shifted to
the outside wheels.
To add more sophisticated effects to your car or motorcycle model, use the same sequence
of steps that have been used to come up with the basic model. First, create a force diagram to
determine what forces and torques act on the vehicle and the direction in which they act.
Second, come up with equations that describe the motion of the vehicle based on the force
diagram. Finally, code up and solve the equations of motion using an ODE solver.
Summary
In this chapter, once again armed with a basic knowledge of Newtonian mechanics and kine-
matics, you learned the basic physics behind the forces and accelerations that act upon cars
and motorcycles. Many of the concepts covered in this chapter are equally applicable to other
types of motor vehicles such as snowmobiles or tanks. You should now be able to create fun
and realistic motor vehicle simulations.
Some of the specific things you learned in this chapter include the following:
How transmission gears are used to increase engine torque
How to model aerodynamic drag and rolling friction for a car
What the redline rpm value is and its effect on car performance
How the wheel torque is a function of the engine torque, the gear ratio, and the final
drive ratio
How wheel traction limits the maximum acceleration of a car
How to calculate the turn radius and turn rate for a car driving around a curve
How motorcycles turn by leaning into the turn
Search WWH ::




Custom Search