function update(game: Game, entity: Entity, delta: number) {
let local = game.World.LocalTransform2D[entity];
let rigid_body = game.World.RigidBody2D[entity];
if (rigid_body.Kind === RigidKind.Dynamic) {
rigid_body.VelocityLinear[1] += GRAVITY * delta;
vec2_scale(rigid_body.Acceleration, rigid_body.Acceleration, delta);
vec2_add(rigid_body.VelocityLinear, rigid_body.VelocityLinear, rigid_body.Acceleration);
vec2_scale(velocity_drag, rigid_body.VelocityLinear, -rigid_body.Drag);
vec2_add(rigid_body.VelocityLinear, rigid_body.VelocityLinear, velocity_drag);
vec2_scale(velocity_delta, rigid_body.VelocityLinear, delta);
vec2_add(local.Translation, local.Translation, velocity_delta);
local.Rotation += rigid_body.VelocityAngular * delta;
game.World.Signature[entity] |= Has.Dirty;
vec2_set(rigid_body.Acceleration, 0, 0);
}
}