110 likes | 126 Views
Experience the thrill of driving a vehicle in a virtual world using a virtual keyboard to control power, thrust, and orientation. Explore kinematic and dynamic maneuvers in a challenging environment.
E N D
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 v drag = -k v x thrust = Power Rot (q) Sforce = 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 x vel q pos Force_gas z