Driving Land Vehicle Game Programming Fall 2013
Content Kinematic maneuver Dynamic maneuver
Remark No dynamics Position of vehicle implicitly defined in modelview matrix Difficult to compute bounding boxes
Dynamic Maneuver Assume the vehicle is a particle The power and angle of thrust can be controlled Drag is always opposite to the velocity (no drag is motionless) Integrate equations of motion by Euler’s method thrust = Power Rot ( ) v x drag = -k v force = thrust + drag
Using Virtual Keyboard UP/Down: increase/decrease power by a ratio Home: start engine with power = 1.0 Space: stop engine with power = 0.0 Left/Right: turning (next page) Force_gas: the thrust force exerted by the power
Engine Force Power: controlled by up, down, home, space Theta_thrust: controlled by tank orientation (theta), left and right
Tank Rendering pos vel Force_gas x z