8 #include "world_physics.h"
10 static float k_car_spring
= 1.0f
,
11 k_car_spring_damp
= 0.001f
,
12 k_car_spring_length
= 0.5f
,
13 k_car_wheel_radius
= 0.2f
,
14 k_car_friction_lat
= 0.6f
,
15 k_car_friction_roll
= 0.01f
,
16 k_car_drive_force
= 1.0f
,
17 k_car_air_resistance
= 0.1f
,
18 k_car_downforce
= 0.5f
;
20 typedef struct drivable_vehicle drivable_vehicle
;
21 struct drivable_vehicle
28 float tangent_mass
[4][2],
35 v3f tangent_vectors
[4][2];
40 .obj
= { .type
= k_rb_shape_sphere
, .inf
.sphere
.radius
= 1.0f
,
41 .rb
.co
= {-2000,-2000,-2000}}
44 static int spawn_car( int argc
, const char *argv
[] );
45 static void vehicle_init(void);
46 static void vehicle_wheel_force( int index
);
47 static void vehicle_solve_friction(void);
48 static void vehicle_update_fixed(void);
49 static void vehicle_update_post(void);
51 #endif /* VEHICLE_H */