Game Development Reference
In-Depth Information
made to simulate variable-throttle acceleration. One of the problems with the performance
test data was that it only included acceleration data. There was no information on how fast the
boat will slow down if the engines are throttled back. The deceleration of the boat could be
simulated by modeling the drag resistance forces on the boat as a function of velocity. For this
simple boat simulation, when the Decelerate radio button is selected, the boat decelerates at a
constant -2.0 m/s 2 .
Powerboat Turns
The way that a powerboat turns depends on the type of drive system that it has. Boats with
direct drives turn by way of underwater rudders. Boats with outboard or inboard/outboard
drives turn by rotating the engine or the propeller shafts to the desired turn angle. As shown in
Figure 9-10, rotating the engine or propeller shafts rotates the direction of the thrust force of
the engine, F T .
F T
F z
F x
z
x
Figure 9-10. Rotating the thrust force vector creates a torque that turns the boat.
When the thrust force vector is rotated, there will be force components normal and
perpendicular to the direction that the boat is traveling. The normal force component, F z
in Figure 9-10, will create a torque about the center of mass of the boat. As we saw in Chapter 4,
the torque will result in an angular acceleration of the boat.
τ
==
Fr
I
α
(9.28)
The quantity, r , in Equation (9.28) is the distance from the center of mass to the propeller.
The angular acceleration, a , represents the rate at which the orientation (that is, angle) of the
boat will change during the turn. One thing that must be determined is the moment of inertia,
I , of the boat. The moment of inertia will depend on the shape and weight distribution of the
boat. For game programming purposes, a rough approximation for the moment of inertia of
the boat would be to assume it was the same as a cylinder.
2
1
1
m ⎛⎞
b
2
I
=
l
+
(9.29)
⎝⎠
b
b
12
4
2
In Equation (9.29), m b is the mass of the boat, l is the boat length, and b is the beam, or
width, of the boat. Equation (9.29) is based on a vertical spin axis that goes through the center
of the boat.
 
Search WWH ::




Custom Search