export function rigid_body(kind: RigidKind, bounciness = 0.5) {
return (game: Game, entity: Entity) => {
game.World.Signature[entity] |= Has.RigidBody;
game.World.RigidBody[entity] = {
Kind: kind,
ColliderId: entity,
Bounciness: bounciness,
Acceleration: [0, 0, 0],
VelocityLinear: [0, 0, 0],
VelocityResolved: [0, 0, 0],
LastPosition: [0, 0, 0],
IsGrounded: false,
};
};
}