Functional gravity implementation for all object types.