How to replicate gravity in c++? (rigirbody sleeping problems)

Bump, cant find the engine implementation