MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / setGravity

Method setGravity

src/engine/PhysicsWorld.cpp:972–978  ·  view source on GitHub ↗

Set the gravity vector of the world * @param gravity The gravity vector (in meter per seconds squared) */

Source from the content-addressed store, hash-verified

970 * @param gravity The gravity vector (in meter per seconds squared)
971 */
972void PhysicsWorld::setGravity(const Vector3& gravity) {
973
974 mConfig.gravity = gravity;
975
976 RP3D_LOG(mConfig.worldName, Logger::Level::Information, Logger::Category::World,
977 "Physics World: Set gravity vector to " + gravity.to_string(), __FILE__, __LINE__);
978}
979
980// Set the sleep linear velocity.
981/// When the velocity of a body becomes smaller than the sleep linear/angular

Callers 1

updateEngineSettingsMethod · 0.80

Calls 1

to_stringMethod · 0.45

Tested by

no test coverage detected