driving land vehicle game programming fall 2013. content kinematic maneuver dynamic maneuver

11
Driving Land Vehicle Game Programming Fall 2013

Upload: madeline-owens

Post on 18-Jan-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver

Driving Land VehicleGame ProgrammingFall 2013

Page 2: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver

ContentKinematic maneuverDynamic maneuver

Page 3: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver
Page 4: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver
Page 5: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver
Page 6: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver
Page 7: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver

RemarkNo dynamicsPosition of vehicle implicitly defined in modelview matrix Difficult to compute bounding boxes

Page 8: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver

Dynamic ManeuverAssume the vehicle is a particleThe power and angle of thrust can be controlledDrag 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

ttatvttvttvtxttx

)()()()()()(

Page 9: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver

Using Virtual KeyboardUP/Down: increase/decrease power by a ratioHome: start engine with power = 1.0Space: stop engine with power = 0.0Left/Right: turning (next page)Force_gas: the thrust force exerted by the power

Page 10: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver

Engine Force

Power: controlled by up, down, home, spaceTheta_thrust: controlled by tank orientation (theta), left and right

Page 11: Driving Land Vehicle Game Programming Fall 2013. Content Kinematic maneuver Dynamic maneuver

Tank Rendering

pos

vel

Force_gas

x

z