function update(game: Game, entity: Entity) {
let control = game.World.ControlAlways[entity];
let move = game.World.Move[entity];
if (control.Direction) {
vec3_add(move.Direction, move.Direction, control.Direction);
}
if (control.Rotation) {
quat_multiply(move.LocalRotation, move.LocalRotation, control.Rotation);
}
if (control.Animation) {
for (let ent of query_down(game.World, entity, Has.Animate)) {
let animate = game.World.Animate[ent];
animate.Trigger = control.Animation;
}
}
}