diff --git a/src/game.c b/src/game.c index c353e71d..6c2d8f5d 100644 --- a/src/game.c +++ b/src/game.c @@ -184,13 +184,14 @@ INTERNAL void spawn_test_entities(f32 offset) //e->control_force = 5000; e->control_force = 250; #endif - e->control_turn_speed = 10; + //e->control_turn_speed = 10; + e->control_turn_speed = 1; e->control.focus = V2(0, -1); entity_enable_prop(e, ENTITY_PROP_PHYSICAL); - e->mass_unscaled = 50; + e->mass_unscaled = 10; //e->inertia_unscaled = F32_INFINITY; - e->inertia_unscaled = 100; + e->inertia_unscaled = 10; e->linear_ground_friction = 200; e->angular_ground_friction = 100; @@ -1535,9 +1536,8 @@ INTERNAL void game_update(struct game_cmd_array game_cmds) } { - /* TODO: Why is 25 working here? */ f32 inertia_scaled = ent->inertia_unscaled * math_fabs(xform_get_determinant(xf)); - joint_ent->motor_joint_data.max_torque = (25 * PI * inertia_scaled) * ent->control_turn_speed; + joint_ent->motor_joint_data.max_torque = ((1.f / dt) * (PI / 2) * inertia_scaled) * ent->control_turn_speed; } /* Solve for final angle using law of sines */